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.
RequestText:
"{""database"":""tracking"",""collection"":""jobs"",""limit"":10,""querystr"":""""}"

MacHash:
68C904C4195F115711C7243048F38A65EC55B59FB3CA4972511DDB9AC7ACC068

This is the actual JSON that is being passed in the message body as found in environment monitoring for the request:
{"database":"tracking","collection":"jobs","limit":10,"querystr":""} 
which matches exactly save the escaped quotes and opening and closing quotes.  

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

I am at a loss on how to proceed.


Hi,


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?