Jump to content

Archived

This topic is now archived and is closed to further replies.

lucerias

Decrypt the string

Recommended Posts

I use crypt to encrypt the password of user and i need to send a password recovery email to the users when they ask for it. May i know how to decrypt the password stored in the database from encrypted form to the original string? Thank you.

Share this post


Link to post
Share on other sites
The PHP crypt() function uses a one-way encryption algorithm. If you crypt the password with this function you could brute force it but I dought anyone would take that route for forgotten passwords.
Although you cannot un-encrypt the password you can easily generate them a new password and send them the new password via email, or you could even set up a temporary password they can login with. Once they login they can simply change there password.
Hope this helps!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.