pass-hash
v2.0.0
Published
Salted password hashing and verifying ported from the crackstation.net Java version
Downloads
2
Readme
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 1000algorithm
- Defaults to'sha1'
. Can be any algorithm returned bycrypto.getHashes
.saltLength
- Default is 24