two way encryption prob??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
PHPycho
Forum Contributor
Posts: 336
Joined: Fri Jan 06, 2006 12:37 pm

two way encryption prob??

Post by PHPycho »

i wanna to have the two way encrption..ie if a password is encrypted then it can be decrypted to send it if the user forgets his password....
Tell me the best two way encryption function in PHP...
Thanks u in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that would depend on what you have available.. mcrypt is up there..
User avatar
PHPycho
Forum Contributor
Posts: 336
Joined: Fri Jan 06, 2006 12:37 pm

Post by PHPycho »

I wanna know the security issues of mcrpyt if any?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

read up on each of the encryptions it offers.. there is a LOT of data on them out there.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

You could always use a "Secret question" system in combination with a "reset password" system where if they get the secret question correct, then a new pass is generated (reset) and e-mailed to them.

Personally I prefer an irreversable way like above, so if my site files and database data was compromised some how, the passwords are still secure for the most part.

But if you prefer having the option to decrypt, then take a look at the link feyd suggested.
Post Reply