2.0.0 • Published 8 years ago

pass-hash v2.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

pass-hash

npm install pass-hash

A salted password hash ported from the Java version from crackstation.net

Usage

var passhash = require('pass-hash')

passhash.config(opts) // optionally configure

passhash.generate('secret', function (err, hashed) {
  passhash.verify('secret', hashed, function (err, ok) {
  	assert(ok) // will be false if password does not match
  })
})

Options

  • iterations - Default is 1000
  • algorithm - Defaults to 'sha1'. Can be any algorithm returned by crypto.getHashes.
  • saltLength - Default is 24