http://qs321.pair.com?node_id=868119


in reply to Exchanging md5s between Perl and C

It seems to me it's your line endings...

echo -n "a" | md5sum gives me the same thing as md5_hex("a"). "a\n" and "a" should not hash to the same thing.

It's also worth noting that Digest::MD5 really is C, as much as /usr/bin/md5sum is: MD5.xs.