|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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. 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 . |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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. > > 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 . > > I'd suggest you find out what the md5->add function does before trying to convert it. Try a perl newsgroup. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Jun 13, 3:54 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> 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 . 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. |
|
![]() |
| Outils de la discussion | |
|
|