Jump to content


Photo

Decrypt the string


  • Please log in to reply
1 reply to this topic

#1 lucerias

lucerias
  • Members
  • PipPipPip
  • Advanced Member
  • 101 posts

Posted 18 October 2006 - 03:35 AM

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.

#2 skarecrow

skarecrow
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 18 October 2006 - 04:09 AM

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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users