Posted: Tue Aug 22, 2017 11:10 am Post subject: Using hmac-sha256
Newbie
Joined: 22 Aug 2017 Posts: 2
Here is the associated code to help clarify what I'm trying to do:
DP code:
Code:
var keyBuf = new Buffer("mysecretkey");
var hmac = crypto.createHmac('hmac-sha256', keyBuf); // this fails because keyBuf not 256 bits
var hmac_result = hmac.update(“Message”).digest('base64');
console.debug('hmac_results:' + hmac_result);
JS code:
Code:
var hash = CryptoJS.HmacSHA256("Message","mysecretkey"); / /this succeeds
var results = CryptoJS.enc.Base64.stringify(hash);
Posted: Wed Apr 17, 2019 12:02 pm Post subject: Using hmac sha256
Newbie
Joined: 11 Apr 2019 Posts: 1 Location: Turkey
So, just in case I cant get any useful information out of Amazon, is there some way I can decode the signature that their MWS Scratchpad app gives me - it was created with I think my AWS Access Key ID and some mystery string. The Scratchpad gives me a value for "SHA 256 HMAC" some big long incoherent string and "Base64 HMAC" which is the value used for the Signature parameter.
Is there some way to take my AWS Access Key ID and one of the values they give me to decode the original string so I can look at it in text format? If I had that, I think I might be able to finish my app pretty quickly.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum