index.js
function verify(hashstr, password) {
  const name = which(hashstr);

  if (name === null) {
    throw new TypeError('No compatible algorithm installed.');
  }

  return use(name).verify(hashstr, password);
}
function verify(hashstr, password) {
  const name = which(hashstr);

  if (name === null) {
    throw new TypeError('No compatible algorithm installed.');
  }

  return use(name).verify(hashstr, password);
}
function verify ( hashstr , password ) { const name = which ( hashstr ) ; if ( name === null ) { throw new TypeError ( 'No compatible algorithm installed.' ) ; } return use ( name ) . verify ( hashstr , password ) ; }
Determines whether or not the hash provided matches the hash generated for
the given password choosing the right algorithm based on the identifier
contained in the hash.
@public
@param {string} hashstr Secure hash string generated from this package.
@param {string} password User's password input.
@returns {Promise.<boolean>} A boolean that is true if the hash computed
for the password matches.
Determines whether or not the hash provided matches the hash generated for the given password choosing the right algorithm based on the identifier contained in the hash .