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#7F73

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

Reply via email to