You need to sign in to do that
Don't have an account?
Mike Borozdin.ax1408
Issues with Crypto.generateMac()
Hi,
We need to make a few callouts to a service that is using OAuth 1.0 and requires each request to be signed with HMAC-SHA1.
The service doesn't have any APEX client API. Thus, we have to do it manually.
Unfortunately,
EncodingUtil.base64Encode(Crypto.generateMac('hmacSHA1', Blob.valueOf(data), Blob.valueOf(key)));
returns a different string from what we expect. We have compared the output for the same input with libraries for other languages. And the output was different.
I am having the same problem using Crypto.generateMac('HMACSHA256', Blob.valueOf(inputData), Blob.valueOf(AuthenticationKey)); and comparing to a .NET HMACSHA256 for the same input.
Same problem for me : anyone found a workaround ?
Rup