Bcrypt hash function takes in a 3 arguments value, salt and callback. If the salt is a number however it does the bcrypt.salt function for you. Its just slighter fewer lines of code.
bcrypt.hash(data.password, 10, function(err, hash) {
if (err) {
console.log(err);
} else {
// do some other stuff
Bcrypt hash function takes in a 3 arguments value, salt and callback. If the salt is a number however it does the bcrypt.salt function for you. Its just slighter fewer lines of code.