src/crypto_browser.js
function(data, key, keysize) {
      var input, mode;
      if (keysize == null) {
        keysize = 512;
      }
      data = this.toHex(data);
      key = this.toHex(key);
      mode = "SHA-" + keysize;
      input = new jsSHA(data, "HEX");
      return input.getHMAC(key, "HEX", mode, "HEX");
    }
function(data, key, keysize) {
      var input, mode;
      if (keysize == null) {
        keysize = 512;
      }
      data = this.toHex(data);
      key = this.toHex(key);
      mode = "SHA-" + keysize;
      input = new jsSHA(data, "HEX");
      return input.getHMAC(key, "HEX", mode, "HEX");
    }
function ( data , key , keysize ) { var input , mode ; if ( keysize == null ) { keysize = 512 ; } data = this . toHex ( data ) ; key = this . toHex ( key ) ; mode = "SHA-" + keysize ; input = new jsSHA ( data , "HEX" ) ; return input . getHMAC ( key , "HEX" , mode , "HEX" ) ; }
Cryptographically hash data using HMAC.
@param {String|Buffer} data The data to be hashed.
@param {String|Buffer} key The key to use with HMAC.
@param {Number} [keysize=512] The keysize for the hash function.
@return {String} The hmac digest encoded as hex.
Cryptographically hash data using HMAC .