bcryptjs-then

bcryptjs as promised

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
bcryptjs-then
301.0.16 years ago6 years agoMinified + gzip package size for bcryptjs-then in KB

Readme

bcryptjs-then
!NPM versionnpm-imagenpm-url !Build statustravis-imagetravis-url
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)
})