I am connecting to the Amazon Product Advertising API, and to sign my request I need to base64-encode the raw binary output of an HMAC-SHA256 hash.
In t
You can also use this npm package to do the same in Javascript.
var jsSHA = require('jssha'); hmac_sha1(string, key){ let shaObj = new jsSHA("SHA-1", "TEXT"); shaObj.setHMACKey(key, "TEXT"); shaObj.update(string); let hmac = shaObj.getHMAC("B64"); return hmac; };