lib/class/Handshake.js
function() {
      var cert = this.keychain.getCertPem();
      if (!cert) {
        throw new CError('missing certificate').log();
      }
      var tmp = this.getDate() + '::' + cert + '::' + SECRET_CLIENT;
      var hmac = forge.hmac.create();
      hmac.start('sha256', SECRET);
      hmac.update(tmp);
      return hmac.digest().toHex();
    }
function() {
      var cert = this.keychain.getCertPem();
      if (!cert) {
        throw new CError('missing certificate').log();
      }
      var tmp = this.getDate() + '::' + cert + '::' + SECRET_CLIENT;
      var hmac = forge.hmac.create();
      hmac.start('sha256', SECRET);
      hmac.update(tmp);
      return hmac.digest().toHex();
    }
function ( ) { var cert = this . keychain . getCertPem ( ) ; if ( ! cert ) { throw new CError ( 'missing certificate' ) . log ( ) ; } var tmp = this . getDate ( ) + '::' + cert + '::' + SECRET_CLIENT ; var hmac = forge . hmac . create ( ) ; hmac . start ( 'sha256' , SECRET ) ; hmac . update ( tmp ) ; return hmac . digest ( ) . toHex ( ) ; }
Generate a valid token

@returns {String} The token
Generate a valid token