D
David Filmer
Greetings. Kindly consider these two methods to create an MD5 digest
(in hex format):
perl -e "use Digest::MD5 'md5_hex'; print md5_hex('foo')"
acbd18db4cc2f85cedef654fccc4a4d8
echo foo |md5sum
d3b07384d113edec49eaa6238ad5ff00
Ummm, shouldn't those be the same?
perldoc Digest::MD5
[snip]
The MD5 algorithm is defined in RFC 1321
md5sum --help
md5sum (GNU coreutils) 6.4
[snip]
The sums are computed as described in RFC 1321.
Can someone tell me why these two methods produce different output?
Thanks!
(in hex format):
perl -e "use Digest::MD5 'md5_hex'; print md5_hex('foo')"
acbd18db4cc2f85cedef654fccc4a4d8
echo foo |md5sum
d3b07384d113edec49eaa6238ad5ff00
Ummm, shouldn't those be the same?
perldoc Digest::MD5
[snip]
The MD5 algorithm is defined in RFC 1321
md5sum --help
md5sum (GNU coreutils) 6.4
[snip]
The sums are computed as described in RFC 1321.
Can someone tell me why these two methods produce different output?
Thanks!