bcryptjs-then

1.0.1 • Public • Published

bcryptjs-then

NPM version Build status

bcryptjs as promised.

Installation

$ npm install bcryptjs-then

API

Implements two methods:

bcrypt.hash(password, [iterations]).then( hash => )

Hash a password with a # of iterations, defaulting to 10.

bcrypt.hash('password', 15).then(function (hash) {
 
})

bcrypt.compare(password, hash).then( valid => )

Compare a password with a bcrypt hash. Returns a boolean.

bcrypt.compare('password', user.password).then(function (valid) {
  assert(valid)
})

/bcryptjs-then/

    Package Sidebar

    Install

    npm i bcryptjs-then

    Weekly Downloads

    8,027

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • kurigohan