Hello!
I have the following code i C-sharp below that generates a hashed signature:
HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(key)); var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(stringToSign)));
This works fine.
But when I try to replicate this in AL I'm unable to generate the same hash:
Crypto: Codeunit "Cryptography Management"; HashAlgo: Option HMACMD5,HMACSHA1,HMACSHA256,HMACSHA384,HMACSHA512; Crypto.GenerateBase64KeyedHashAsBase64String(stringToSign, key, HashAlgo::HMACSHA256);
I would be very grateful if someone could explain to me what I'm doing wrong.