60
4
I tried to generate the MD5 sum (using md5sum) of a string, "hello". I tried out different methods as the md5sum tool in Linux, PHP's MD5() function as well as various online text to md5sum translators.
echo "hello" | md5sum
and
echo "hello" > file && md5sum file
Gave the result b1946ac92492d2347c6235b4d2611184
. However, PHP's md5() function and almost all online generators gave the output 5D41402ABC4B2A76B9719D911017C592
.
What is the reason?
38echo -n "hello" – Martin York – 2016-02-21T21:27:53.457
16http://superuser.com/questions/71554/md5-why-is-my-command-line-hash-different-from-online-md5-hash-results – Miles – 2016-02-22T01:50:31.197