You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Is there a way for this function to return binary instead of Hex? oic.crypto.hmacsha256?

Summary:

I need to trigger a REST API wherein, the hash value is a SHA-256 digest of a concatenation of a series of strings and the output

should be in binary, and not in hexadecimal. I'm trying the below code but it seems that the output in OIC is hexadecimal. Is there a way to make the output binary?


Content (please ensure you mask any confidential information):


Version (include the version you are using, if applicable):



Code Snippet (add any code snippets that support your topic, if applicable):

function generate_hashCode(hmacString_value, hmacKey_value) {
var hashCode_value = oic.crypto.hmacsha256 ( hmacString_value, hmacKey_value);

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!