src/lib/hash.js
function hash(method) {
  // Is user supplies a function, use it and assume they will take of any
  // encoding (Base-64 or otherwise).
  if (typeof method === 'function') {
    return method;
  }

  if (hashFunctions.hasOwnProperty(method)) {
    return hashFunctions[method];
  }

  throw new Error(`Could not resolve hash function, received ${typeof method}.`);
}
function hash(method) {
  // Is user supplies a function, use it and assume they will take of any
  // encoding (Base-64 or otherwise).
  if (typeof method === 'function') {
    return method;
  }

  if (hashFunctions.hasOwnProperty(method)) {
    return hashFunctions[method];
  }

  throw new Error(`Could not resolve hash function, received ${typeof method}.`);
}
function hash ( method ) { // Is user supplies a function, use it and assume they will take of any // encoding (Base-64 or otherwise). if ( typeof method === 'function' ) { return method ; } if ( hashFunctions . hasOwnProperty ( method ) ) { return hashFunctions [ method ] ; } throw new Error ( ` ${ typeof method } ` ) ; }
Return a hash function for SGP to use.
Return a hash function for SGP to use .