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
PHP:
base64_encode(hash_hmac('sha256', $value, $key, true));
Nodejs equivalent:
const crypto = require('crypto'); let token = crypto.createHmac("sha256", key).update(value).digest().toString('base64');