HMAC (hash-based message authentication code) function from CryptoJS, packaged for Meteor.
Inside your project folder run
$ meteor add jparker:crypto-hmac
You'll also need to have installed the package for the hash function you want to use, such as MD5 (jparker:crypto-md5) or SHA1 (jparker:crypto-sha1). Once you have jparker:crypto-hmac installed, any crypto-* hash function packages you install will provide a corresponding method under the CryptoJS namespace.
var hash = CryptoJS.HmacMD5('Message', 'Secret Passphrase').toString(); // '5e03d0c1b42ef0b7e61fb333f3993949'var hash = CryptoJS.HmacSHA1('Message', 'Secret Passphrase').toString();var hash = CryptoJS.HmacSHA256('Message', 'Secret Passphrase').toString();
The CryptoJS project lives at https://code.google.com/p/crypto-js/.
HMAC functions are documented at https://code.google.com/p/crypto-js/#HMAC.
jparker:crypto-md5jparker:crypto-sha1jparker:crypto-sha256jparker:crypto-base64jparker:crypto-aes
Based on Dan Dascalescu's work