重置密码CakePHP 2.X BlowfishPasswordHasher

时间:2017-08-01 23:34:24

标签: php mysql cakephp encryption passwords

我正在使用Cakephp 2.X中的 BlowfishPasswordHasher 加密我的密码。我不记得密码,但我可以访问数据库。如何使用默认密码替换密码,如" 123"?无需创建执行此操作的应用程序。

1 个答案:

答案 0 :(得分:0)

从控制器内的任何功能尝试:

$password = "123";
$hash = Security::hash($password, 'blowfish');
debug($hash);die();