I had a similar problem. I think it has to do with the character encoding 
of the output hash.

My only resort (very ugly!!) was to have a perl script wich calculated the 
hash. The perl script looks like:

#!/usr/bin/perl
use Digest::MD5 qw(md5_base64);
print md5_base64($ARGV[0]);

Maybe your problem is similar. The perl MD5 modules seems to have more 
encoding options than the php one. Have a look it might give you a clue as 
to where the problem is.

Andre

At 18:10 29/08/2001 +0300, Andrey Hristov wrote:
>I'm not so sure, but there is another parameter to md5() - the salt.
>
>Andrey Hristov
>IcyGEN Corporation
>http://www.icygen.com
>99%
>
>----- Original Message -----
>From: "Ignat Ikryanov" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, August 29, 2001 4:45 PM
>Subject: [PHP-DB] MD5 (' ')
>
>
>Hi!
>I use md5 function to encrypt users password stored in MySql database. 
>When I try encrypt string 'asdf' using md5 function I
>retrieve:
>912ec803b2ce49e4a541068d495ab570
>But in 'shodow' file of my linux (Debian 2.2 used MD5 to encrypt users 
>password) 'asdf' string looks like:
>$1$arjq575D$rnHVFfcQE7.h2EgSU7yzQ1
>
>Why results are different?
>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to