CryptoAPI / ComputeMAC Hash not Matching

CryptoAPI / ComputeMAC Hash not Matching


This is a follow on post to one previously asked incorrectly.

I have simplified the action to include the Request.RequestText from the API method.  The screen shot shows the text being used by ComputeMac to calculate the Mac_Hex which is also shown.


This is the actual JSON that is being passed in the message body as found in environment monitoring for the request:
which matches exactly save the escaped quotes and opening and closing quotes.  

The hash i get from online sources with the JSON above is:

I am at a loss on how to proceed.


Can you put up a simple example oml, because that would make the investigation easier.

Btw, you are talking about Mac and Hash, and in CryptoAPI there are also 2 methods "ComputeHash" and "ComputeMAC"

And what online sources are you comparing?

please remind also that if they or you use different encodings on the string, there could be an issue as well of course (utf-8 vs. utf-16 comes to mind)

Hello Tony,

In ComputeMac I use a very specific key derivation. I seriously doubt this is the action you want to use to integrate with third party systems, or that an online tool will match this output.

If you can produce the MAC Key in binary form, you may be able to use KComputeMac for what you want.

Can you be a bit more specific with what you're trying to do?

I am also not getting the correct Hash string.  I am hashing   (using ComputeHash) :



I am getting :


instead of 


do I need to encode the text in any way? (i.e. json format ,  )

The issue seems to be with the line feeds I have in the text. Single lines seem to hash correctly, but multiple lines of text do not.

I think I found the way around this issue with the newline:  use  

SyntaxEditor Code Snippet


functiion instead of newline()