We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no matter what password I pass, compare always returns success. Am I doing something wrong? Here's an example of very primitive app:
var bcrypt = require('bcryptjs'); var mypass = 'B4c0/\/'; var mysalt = ''; var myhash = ''; mysalt = bcrypt.genSaltSync(10); myhash = bcrypt.hashSync(mypass, mysalt); bcrypt.compare(mypass + 'a', myhash) .then(() => {console.log("Comparison was true")}) .catch(() => {console.log("Comparison was false")});
OS: Win x64 npm: 4.0.5 node: 7.4.0
The text was updated successfully, but these errors were encountered:
I'd say the README example on promises (pr) is incorrect:
bcrypt.compare(mypass + 'a', myhash) .then((res) => {console.log("Comparison was: " + res)}) .catch(() => {console.log("Exception thrown")});
Sorry, something went wrong.
README: Corrected promises example, see #51
2ab0521
Thanks
catch
No branches or pull requests
no matter what password I pass, compare always returns success. Am I doing something wrong?
Here's an example of very primitive app:
OS: Win x64
npm: 4.0.5
node: 7.4.0
The text was updated successfully, but these errors were encountered: