# Keyed Hash for HMAC SHA256 [duplicate]

I'm trying to use AWS REST API's (because I can't rely on AWSLink). The sample C# code from Amazon uses this a lot:

var keyedHash = KeyedHashAlgorithm("HMACSHA256")
keyedHash.Key = someByteArray
keyedHash.ComputHash(data)


But I can't figure out how to translate this to the Wolfram Language. Or maybe I can use SecuredAuthenticationKey directly with AWS? If so I'm not sure what the token endpoints are.

• Can you give an example of what the expected outputs are for each step, including someByteArray? (Please use example data, not actual keys or something 😅) At first glance it looks like you might want Hash, but it doesn't include that specific algorithm. – Carl Lange Mar 19 '19 at 17:50
• Seems related: mathematica.stackexchange.com/questions/94891/… Check the answer of this one: mathematica.stackexchange.com/questions/159128/… – Carl Lange Mar 19 '19 at 17:51
• Thanks Carl, I saw your first link before posting but thought it was missing the point. Looking closer I think I need to try to reproduce what they're doing. I'll get back to you. – Eric William Smith Mar 19 '19 at 18:33
• You also may want to look at GenerateAsymmetricKeyPair`. IIRC in version 12 there will be some updates to this system. – Carl Lange Mar 19 '19 at 18:35
• I did see GenerateAsymmetricKeyPair in the prerelease but wasn't sure that was the right path. In any case, the answer is here: mathematica.stackexchange.com/a/167638/27694 I think the first link you suggested (94891...) is outdated. While Mathematica is incredibly backwards compatible something wasn't translating correctly to 11.3 or 12... or something is missing in their post – Eric William Smith Mar 19 '19 at 19:32