UNPKG

aws-lib

Version:

Extensible Node.js library for the Amazon Web Services API

7 lines (5 loc) 174 B
var crypto = require("crypto") exports.hmacSha256 = function (key, toSign) { var hash = crypto.createHmac("sha256", key); return hash.update(toSign).digest("base64"); }