How can I decrypt password string in PHP which was encrypted with crypt?

前端 未结 3 631
半阙折子戏
半阙折子戏 2020-12-22 10:18

How can I decrypt a password string in PHP which was encrypted with crypt?

$salt = substr($_POST[\'password\'], 0, 2);  
$password = crypt($_POS         


        
3条回答
  •  春和景丽
    2020-12-22 10:24

    1) you can use symmetric encryption instead of hash (crypt function is hash) - in this way you would have possibility to decrypt it.

    2) usually sites services create special link and mail it to user. By this link we have page where we can change password. It is more safe way to store passwords.

提交回复
热议问题