Benjamin Outram wrote: > > Hello, Hello,
> I am trying to figure out why $md5->add("abc") does not give the same digest > as > > $value = pack('N*',(0x0061,0x0062,0x0063); ^ You have an extra left parenthesis there. Actually that line would be valid without any parenthesis. Anyway, your problem is that the 'N' pack format converts numbers to 32 bit integers. $ perl -le' $value = pack "N*", 0x0061, 0x0062, 0x0063; print length $value; printf "%02X ", ord for split //, $value; print ' 12 00 00 00 61 00 00 00 62 00 00 00 63 What you want to do is pack the numbers as 8 bit integers: $ perl -le' $value = pack "C*", 0x0061, 0x0062, 0x0063; print length $value; printf "%02X ", ord for split //, $value; print ' 3 61 62 63 > $md5->add($value); > > I thought that passing characters to the 'add' method was the same as > passing a stream of character byte representations. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]