hmac
pure js hmac that can be used with any create hash function.
example
var Blake2s ={return}var createHmac =var hmac =var mac = hmac
tested with sha family algorithms against node's crypto lib, and produces correct hashes.
api: createHmac(createHash, len, key)
where createHash
is a function that returns {update(), digest()}
object
and len is either 128 or 64 (sha1, sha224, sha256 use 64,
and sha384, sha512 use 128)
key
is the key (secret) to the hmac.
see also crypto.createHmac()
License
MIT