lib/jwt.js
function hmacSign (input, algorithm, secret) {
  return crypto.createHmac(algorithm, secret).update(input).digest('base64')
}
function hmacSign (input, algorithm, secret) {
  return crypto.createHmac(algorithm, secret).update(input).digest('base64')
}
private utils function
 
hmac sign
@param  {String} input     hamc sign input
@param  {String} algorithm hamc sign algorithm
@param  {String} secret    hamc sign secret
@return {String}           hamc signature