简体   繁体   English

未能将散列密码密码与 node.js 中的 bcrypt.js 进行比较

[英]failing to compare hashed password password with bcrypt.js in node.js

Here is my code which i used to login.这是我用来登录的代码。 I am using simple password 1234 but it still returning false我正在使用简单的密码 1234 但它仍然返回 false

thankyou all i was using async method to campare the hashed value with user entered value first and morever when i just used bcrypt.hash() method it did not work either sync or async then instead i generate salt and the hshed the password and used sync method to compare the password which worked for me谢谢大家,我使用异步方法首先使用用户输入的值来存储散列值,而且当我刚刚使用 bcrypt.hash() 方法时,它既不能同步也不能异步,然后我生成了 salt 和 hshed 密码并使用了同步比较对我有用的密码的方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM