Implementation of http://nacl.cr.yp.to/auth.html (requires TweetNaCl.js).
Written in 2014 by Dmitry Chestnykh. Public domain.
Via NPM:
$ npm install tweetnacl-auth
Via Bower:
$ bower install tweetnacl-auth
or just download nacl-auth.js
or nacl-auth.min.js
and include it after
TweetNaCl.js:
<script src="nacl.min.js"></script>
<script src="nacl-auth.min.js"></script>
Authenticates the given message with the secret key. (In other words, returns HMAC-SHA-512-256 of the message under the key.)
Returns HMAC-SHA-512 (without truncation) of the message under the key