pass-hash

2.0.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i pass-hash

    Weekly Downloads

    1

    Version

    2.0.0

    License

    ISC

    Last publish

    Collaborators

    • raythree