lib/util/crypto.js
function generateHmac(data, key, encoding) {
    var hmac = crypto.createHmac(HMAC_SHA256_ALGORITHM, key);
    hmac.update(data);
    return hmac.digest(encoding);
}
function generateHmac(data, key, encoding) {
    var hmac = crypto.createHmac(HMAC_SHA256_ALGORITHM, key);
    hmac.update(data);
    return hmac.digest(encoding);
}
function generateHmac ( data , key , encoding ) { var hmac = crypto . createHmac ( HMAC_SHA256_ALGORITHM , key ) ; hmac . update ( data ) ; return hmac . digest ( encoding ) ; }
Generate a HMAC for the given data
@param {String} data
@param {String} key
@param {String} encoding
@returns {String|Buffer} will return a Buffer if no encoding given
Generate a HMAC for the given data