|
Posted by C. (http://symcbean.blogspot.c on June 13, 2008, 8:00 am
Please log in for more thread options > jason m wrote:
> > I am wondering how to translate this perl code to php. It seems the
> > md5 function is the same when using hexadecimal in perl but I'm not
> > sure what this md5->add code does.
>
<snip>
>
> I'd suggest you find out what the md5->add function does before trying
> to convert it. Try a perl newsgroup.
>
Not suprisingly it concatenates it.
> > Perl:
> > my $md5ShopPassString = Digest::MD5->new;
> > $md5ShopPassString->add("$ShopId");
> > $md5ShopPassString->add("$OrderId");
> > $ShopPassString = $md5ShopPassString->hexdigest;
>
> > PHP:
> > md5($ShopId . $OrderId);
>
> > These are not equal. Thanks in advance for any help.
If they really aren't the same (you didn't provide examples) then try
using the Base64 method in Perl.
But as Jerry points out we're getting OT here.
C.
|