解密设备密码密码、设备

2023-09-07 09:32:29 作者:等往事风中吹

我需要解密 devise 生成的密码.

I need to decrypt a password generated by devise.

例如,我的密码是test123test.设计生成此密码:

For example, my password is test123test. devise generated this password:

$2a$10$vGeVVu.E0XGjlNEa0xMCK.R0SEH0aFuyJpefrq01Axz6WSbHApPEu 

我需要解密密码并发送test123test.

I need to decrypt the password and send test123test.

推荐答案

你不能,这就是重点.

Bcrypt 将允许您将 test123test$2a$10$vGeVVu.E0XGjlNEa0xMCK.R0SEH0aFuyJpefrq01Axz6WSbHApPEu 进行比较,但它永远不会返回纯文本密码.您可能想问如何破解 bcrypt 加密密码(非常难!我认为几乎不可能)

Bcrypt will allow you compare test123test with $2a$10$vGeVVu.E0XGjlNEa0xMCK.R0SEH0aFuyJpefrq01Axz6WSbHApPEu, but it will never give you the plain text password back. You might want to ask how to crack a bcrypt encrypted password instead (Very hard! Nearly impossible I think)

Jose Valim 通过链接到 http://codahale.com/how 描述了选择 bcrypt 的动机-to-safely-store-a-password/ 来自设计 Google Group.

Jose Valim describes the motivation behind choosing bcrypt by linking to http://codahale.com/how-to-safely-store-a-password/ from the devise Google Group.