Re: [PHP] converting a password database from perl to php

2002-03-22 Thread Rasmus Lerdorf

Show us an example Perl one.  Chances are you can get the PHP crypt()
function to do the right thing by feeding it the correct SALT.

-Rasmus

On Fri, 22 Mar 2002, R'twick Niceorgaw wrote:

 Hi all,
 I'm converting a site written in perl to php. It has a member section which
 is password protected. All the meber passwords are stored in a flat file
 with Perl's MD5 encryption algorithm. I'm planning to use MYSQL database to
 store the member info on the new site. However, I have to import the
 existing member information including their passwords to the new system. I
 was checking the md5() and crypt() functions of PHP but theydon't generate
 the same encrypted password as Perl md5(). Is there any way I can migrate
 these passwords to php without asking each user to update their password on
 the new system ?

 Regards
 R'twick



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



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




Re: [PHP] converting a password database from perl to php

2002-03-22 Thread R'twick Niceorgaw

Hi Rasmus,
Here's what  used in the perl script.
--
use Digest::MD5;
use Digest::MD5 qw( md5_hex );
my $encrypt_password;
my $digestObject = Digest::MD5-new();
$digestObject-add($password);
$encrypt_password = $digestObject-digest();

Here's a sample result form it.

text password : f0rget123
encrypted password: òOú«#7Fá73¯

Under PHP I'm getting a much bigger string with MD5() for the same clear
password string.

Thank you for helping me out with this.

Regards
R'twick

- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: R'twick Niceorgaw [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 11:07 AM
Subject: Re: [PHP] converting a password database from perl to php


 Show us an example Perl one.  Chances are you can get the PHP crypt()
 function to do the right thing by feeding it the correct SALT.

 -Rasmus

 On Fri, 22 Mar 2002, R'twick Niceorgaw wrote:

  Hi all,
  I'm converting a site written in perl to php. It has a member section
which
  is password protected. All the meber passwords are stored in a flat file
  with Perl's MD5 encryption algorithm. I'm planning to use MYSQL database
to
  store the member info on the new site. However, I have to import the
  existing member information including their passwords to the new system.
I
  was checking the md5() and crypt() functions of PHP but theydon't
generate
  the same encrypted password as Perl md5(). Is there any way I can
migrate
  these passwords to php without asking each user to update their password
on
  the new system ?
 
  Regards
  R'twick
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 






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




Re: [PHP] converting a password database from perl to php

2002-03-22 Thread Rasmus Lerdorf

 text password : f0rget123
 encrypted password: òOú«#7Fá73¯

Uh, that's not md5 at all.  By definition md5 is 32 characters.

-Rasmus


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




Re: [PHP] converting a password database from perl to php

2002-03-22 Thread R'twick Niceorgaw

I'm sorry, I somehow missed few characters while copying form unix machine.
The actual encrypted string is òOú«#µ7zFá73Y¯ (in hex it is 06 f2 4f fa ab
23 b5 7f 37 9e 46 e1 37 33 9f af)

I have no idea about perl and so now I'm confused as in hte perl script I
see it's using a digest::md5() object to encrypt the password and so thought
it should be same md5() as in php.

If you can guide me to some place where i can look for further info will be
of much help to me.

Thanks for your time
Regards
R'twick
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: R'twick Niceorgaw [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 11:46 AM
Subject: Re: [PHP] converting a password database from perl to php


 text password : f0rget123
 encrypted password: òOú«#7Fá73¯

Uh, that's not md5 at all.  By definition md5 is 32 characters.

-Rasmus


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





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