March 13th, 2000, 06:37 AM
Hi there. I use php3 and mysql. I've got a table filled with registered users. Their passwords are encrypted using the PASSWORD('') function of mysql. But now I want an option: "I forgot my password, please send me my password". Can I decrypt the passwords???
Thanks in advance,
March 13th, 2000, 07:43 AM
No. The mysql password() function does not have a complementary decrypt function. This is the same function used to encrypt passwords in the mysql permissions table so it wouldn't be a good idea to make a decryption function available
If you need to store encrypted passwords then use the php encrypt and decrypt functions. (I think encrypt is right, but check decrypt first to see what is it's complement).
March 24th, 2000, 01:28 PM
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rod k:
If you need to store encrypted passwords then use the php encrypt and decrypt functions. (I think encrypt is right, but check decrypt first to see what is it's complement). [/quote]
Nope. You are thinking of Encode() and Decode () which are used for stream encryption.
There is no reverse for encrypt(). You would need a password cracker or some such thing.
(If such functionality is required, most people just store both the crypted and un-crypted forms in their database, and use whichever one they need).