面对Python的BCRypt模块
这是为我的学校项目。 我在Python中使用bcrypt进行了一个函数来加密函数。现在加密很好,我可以存储它。但是,它在检查哈希代码时显示出错误。
def decrypt(password, hashed):
password=password.encode('utf-8')
return bcrypt.checkpw(password, hashed)
这是功能。在这里,“密码”是用户的输入,我正在从数据库中调用的“ hashed”变量。
这是我得到的错误
我该怎么办?
This is for my school project.
I made a function to encrypt functions using bcrypt in python. Now the encryption is fine and I can store it. But it shows error while checking the hashed code.
def decrypt(password, hashed):
password=password.encode('utf-8')
return bcrypt.checkpw(password, hashed)
This is the function. Here the 'password' is the input by user and 'hashed' variable I am calling from the database.
This is the error I am getting
what do I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论