Home > Archive > PHP DB > January 2008 > Re: [PHP-DB] md5() function
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PHP-DB] md5() function
|
|
| Steven Cruz 2008-01-14, 7:01 pm |
| 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
>
>
| |
| Jason Gerfen 2008-01-14, 7:01 pm |
| 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:
>
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
| |
| Miguel Guirao 2008-01-15, 4:00 am |
| 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:
>
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
|
|
|
|
|