code: function generate(token, alg) {
    assert.equal(typeof token, 'string', 'first argument must be a string');
  
    const digest = createHash(getSHAsize(alg)).update(token).digest();
    return encode(digest.slice(0, digest.length / 2));
  }
docs: @name generate
  @api public
  
  Generates a `_hash` value from an token value.
  
  @param token {String} token value to generate the hash from
  @param alg {String} ID Token JOSE header alg value (i.e. RS256, HS384, ES512, PS256)