How to retrieve original password which wa encrypted

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
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

How to retrieve original password which wa encrypted

Post by adsegzy »

Hello people,

I have a membership site where people register. I encrypted their password for security purpose and tis working fine, members are also logining in comfortably. If a member forget his password, i ask for his first name, last name and email address; once the three are correct, his email will be sent to box. but how do i send the original password to the member and not encrypted one?
Eg the password is 'book' and the encrypt is '821f03288846297c2cf43c34766a38f7'

How do i send 'book' to his email and not '821f03288846297c2cf43c34766a38f7'

regards
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: How to retrieve original password which wa encrypted

Post by jackpf »

That depends what kind of encryption you used...

You need to use the reverse algorithm to decrypt it.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: How to retrieve original password which wa encrypted

Post by Eran »

That's probably a hash and not an encryption. most hashes are one-way transformations, meaning you can't get back the original value from it. In this case, you usually have to reset the password and send the user a new one.
Last edited by Eran on Sat Dec 05, 2009 12:01 pm, edited 1 time in total.
askbapi
Forum Newbie
Posts: 10
Joined: Fri Dec 04, 2009 11:24 pm
Location: India

Re: How to retrieve original password which wa encrypted

Post by askbapi »

pytrin wrote:That's probably a hash and not an encryption. most hashes are one-way transformations, meaning you can't back the original value from it. In this case, you usually have to reset the password and send the user a new one.
Yes, u have hashed it, so no going back. Better create a new password and send it to the user.
Post Reply