Gossamer Forum
Home : General : Perl Programming :

basic md5 question

Quote Reply
basic md5 question
Can anyone tell me if there's a simple way using perl to generate an md5 hash of a string that will be equal to that generated by the md5() function in PHP? I'm working on some multi-script, cross-language user authentication and this is the one missing link in the plan.

Many thanks for any advice.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] basic md5 question In reply to
use Digest::MD5 qw/md5_hex/;
my $md5_hash = md5_hex("some string");

or if you are using our libs:

use GT::MD5 qw/md5_hex/;
my $md5_hash = md5_hex("some string");

which will work even if you don't have Digest::MD5 installed.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] basic md5 question In reply to
Perfect - thanks!

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund