1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Carl Lange Mar 19 '19 at 17:50
  • 2
    $\begingroup$ Seems related: mathematica.stackexchange.com/questions/94891/… Check the answer of this one: mathematica.stackexchange.com/questions/159128/… $\endgroup$ – Carl Lange Mar 19 '19 at 17:51
  • $\begingroup$ 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. $\endgroup$ – Eric William Smith Mar 19 '19 at 18:33
  • $\begingroup$ You also may want to look at GenerateAsymmetricKeyPair. IIRC in version 12 there will be some updates to this system. $\endgroup$ – Carl Lange Mar 19 '19 at 18:35
  • 1
    $\begingroup$ 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 $\endgroup$ – Eric William Smith Mar 19 '19 at 19:32

Browse other questions tagged or ask your own question.