shaneMangudi / bcrypt-nodejs

Native implementation of bcrypt for NodeJS
Other
574 stars 69 forks source link

Callback required error when hashing with 3 params #58

Open adamreisnz opened 9 years ago

adamreisnz commented 9 years ago

The hash function checks for the existence of a given callback function (4th function parameter), and has progress as a 3rd parameter. But it doesn't check if only 3 params are given. In that case it should assume that the 3rd parameter is the actual callback. This would make it compatible with bcrypt.

joe-hilling commented 9 years ago

Ditto cannot swap out simply for bcrypt because of the required null arg. bcrypt.hash(user.password, salt, null, function(err, hash) { //somestuff });

wedneyyuri commented 8 years ago

+1. It's required for my project.