MD5 Hash Question

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Tim1681
-


Joined: 17 Jan 2005
Posts: 160
Location: Bristol, CT, USA

PostPosted: Wed Jun 28, 2006 5:00 pm    Post subject: MD5 Hash Question Reply with quote

I've been thinking about this lately; haven't really gone out and tried finding an answer but:

When you make a PHP Login System, and you include the 'Lost Password' link which then emails you your password; If you have the password MD5 hashed in the Database, how can PHP convert that back into plaintext and email it to you? Is there an 'undo-md5' command that I don't know about?
_________________
mysql> SELECT * FROM users WHERE clue > 0;
0 rows returned.

Back to top View user's profile Send private message AIM Address
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Wed Jun 28, 2006 5:06 pm    Post subject: Reply with quote

No. They use encryption but allow you to reset your password instead of sending you it. MD5 is an unreversable operation; apparently anyway.

Those that send you it back have some form of encryption in their database that is reversable. Not the best way to store someones password.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Wed Jun 28, 2006 5:08 pm    Post subject: Reply with quote

EDIT: beaten to it...

The whole idea about MD5 is one way encryption only, you cannot unencrypt a MD5 string. The sites that email you your password to you are probably storing them in plain text.

What you can do through is email a reset code to the user which they have to follow before there password can be retrieved/altered, like phpBB offers.
_________________
Olly
Back to top View user's profile Send private message
Tim1681
-


Joined: 17 Jan 2005
Posts: 160
Location: Bristol, CT, USA

PostPosted: Wed Jun 28, 2006 5:18 pm    Post subject: Reply with quote

Yea, that's what I was thinking lol; Thanks guys 8)
_________________
mysql> SELECT * FROM users WHERE clue > 0;
0 rows returned.

Back to top View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group