RE: [PHP-DB] md5() function
| From: | Miguel Guirao | Date: | Tue, 15 Jan 2008 03:38:03 +0000 |
| Subject: | RE: [PHP-DB] md5() function | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44524@lists.php.net to get a copy of this message | ||
Thanks every body for your replies!!
It is clear to me that I can not reverse a hased string!!
Thanks!!!
Guirao
-----Original Message-----
From: Jason Gerfen [mailto:jason.gerfen@scl.utah.edu]
Sent: Lunes, 14 de Enero de 2008 02:04 p.m.
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] md5() function
Steven Cruz wrote:
> Hello;
>
> I maybe wrong, but I believe it is one way. What you need to do is take
> your input and encrypt it and check if matches your current encrypted
> value. :)
>
> peace and hugs.
>
> Miguel Guirao wrote:
>> Hi!!
>>
>> I'm using the md5() function to encrypt a password and store it into a
>> database. Now I want to retrieve that MD5 password and convert it into
>> it's
>> human readable condition.
>> Is there a function opposite to md5()??
>>
>> Best Regards,
>>
>> M Guirao
>>
>>
>
If you want to do a comparison on the md5() hash you just created you
could always run your SQL query like:
SELECT * FROM
table WHERE password = md5( $password ) LIMIT 1;
That will return a true or false value based on the md5() hash of the
$password var. But you cannot reverse the md5 hash to obtain the
original value unless you perform a crack on it using software available
software. I think what you are looking for is the base64_encode() and
base64_decode() functions which will perform a simple encoding of data.
--
Jason Gerfen
"I practice my religion
while stepping on your
toes..."
~The Ditty Bops
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php