RE: [PHP-DB] md5() function

2008-01-14 Thread Miguel Guirao
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:[EMAIL PROTECTED]
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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] md5() function

2008-01-14 Thread Jason Gerfen
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



Re: [PHP-DB] md5() function

2008-01-14 Thread Daniel Brown
On Jan 14, 2008 2:26 PM, Miguel Guirao <[EMAIL PROTECTED]> 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()??

Negative.  Once it's hashed with an MD5, SHA1, or similar
encryption method, it's (as of now) impossible to reverse.  You could
create a table with a column of unencrypted phrases, characters, and
combinations, with a second column containing the correlating hashed
string, but that's about it.

-- 


Daniel P. Brown
Senior Unix Geek and #1 Rated "Year's Coolest Guy" By Self Since
Nineteen-Seventy-[mumble].

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] md5() function

2008-01-14 Thread Andrés G. Montañez
MD5 is also known as an one-way crypt system; you can encryptit but
never unencrypted; only using brute force or a hash list you can
retrive a 'string' that it's hash is the one stored; but it is not
necesary the same original string; this is also known as a hash
collision.

So, in short... no, there isn't a unMd5().
If you need to retrive the original string, try GPG.


On 14/01/2008, Miguel Guirao <[EMAIL PROTECTED]> 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
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Atte, Andrés G. Montañez
Técnico en Redes y Telecomunicaciones
Montevideo - Uruguay

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] md5() function

2008-01-14 Thread Steven Cruz

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

  


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] md5() function

2008-01-14 Thread Miguel Guirao
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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php