I am currently using md5 function to encrypt my password and save to mysql db which can not be decrypted.
Now my user want that when they forgot password, they shou
It is not possible to store the password in such a way that it is still recoverable without either
1) storing the decryption key in your code/data (which rather defeats the purpose of hashing/encrypting the password)
2) encrypting the password using public/private key encryption the routing the recovery through som sort of semi-manual process where the password can be recovered.
The simplest solution is to require your users to provide/maintain a current email address and rely on the security of that to provide a new password on request.
C.