serializer.js
function signStr(str, key) {
  var hmac = crypto.createHmac('sha1', key);
  hmac.update(str);
  return hmac.digest('base64').replace(/\+/g, '-').replace(/\//g, '_');
}
function signStr(str, key) {
  var hmac = crypto.createHmac('sha1', key);
  hmac.update(str);
  return hmac.digest('base64').replace(/\+/g, '-').replace(/\//g, '_');
}
function signStr ( str , key ) { var hmac = crypto . createHmac ( 'sha1' , key ) ; hmac . update ( str ) ; return hmac . digest ( 'base64' ) . replace ( / \+ / g , '-' ) . replace ( / \/ / g , '_' ) ; }
Return base64url signed sha1 hash of str using key
Return base64url signed sha1 hash of str using key