converting php md5 function to perl

C

checarsner

Hey all

how I can convert the PHP password encryption into a Perl function
which generates the same result...
I am completely stuck at this point... My PHP knowledge is close to
zero. I understand their procedure but when I do it in Perl it comes
back with a different result...
in PHP: $newPw["userPassword"] = '{md5}' .
base64_encode(pack('H*',md5($newPasswd)));
sorry the help file is a place where we deffinitly will not find
anything..
the problem is not, understanding what the PHP code is doing. The issue
is to make Perl do the same.

TIA

Che
 
J

John

Hi

I've pulled this from my site

use Digest::MD5 qw (md5_hex); # 32 character hex hash
my $hash=uc(md5_hex($message)); # uppercase

Regards
John
 
C

checarsner

Thanks for the answer John. Would you be willing to explain the
transition from the php version to the perl version? It seems like we
are missing an encryption step to me.
Hi

I've pulled this from my site

use Digest::MD5 qw (md5_hex); # 32 character hex hash
my $hash=uc(md5_hex($message)); # uppercase

Regards
John


Hey all

how I can convert the PHP password encryption into a Perl function
which generates the same result...
I am completely stuck at this point... My PHP knowledge is close to
zero. I understand their procedure but when I do it in Perl it comes
back with a different result...
in PHP: $newPw["userPassword"] = '{md5}' .
base64_encode(pack('H*',md5($newPasswd)));
sorry the help file is a place where we deffinitly will not find
anything..
the problem is not, understanding what the PHP code is doing. The issue
is to make Perl do the same.

TIA

Che
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top