ASP.NET MVC 3 app, BCrypt.CheckPassword failing

后端 未结 3 1469
我寻月下人不归
我寻月下人不归 2021-01-14 04:23

I\'m working on implementing security in an ASP.NET MVC 3 application, and am using the BCrypt implementation found here to handle encryption and verification of passwords.

3条回答
  •  隐瞒了意图╮
    2021-01-14 04:44

    Forgive me if I'm missing something, but looking at your hash and your model you don't seem to store the salt anywhere, instead you use a new salt each time.

    So when the password is set you must store both the hash and the salt; when you want to check an entered password you retrieve the salt, compute the hash using it, then compare against the stored one.

提交回复
热议问题