bcrypt-as-promised
A promisified version of bcrypt
Install via NPM
npm install bcrypt-as-promised
Basic Usage
hashing:
bcrypthash'my password' 10
comparing:
bcrypt
Note: an invalid password/hash combo errors as a rejected promise
The rejection can be checked against instanceof bcrypt.MISMATCH_ERROR
bcrypt ;
generating a salt:
bcrypt
calculating the rounds used in a salt:
bcrypt