mIRC Homepage
Posted By: SGR $md5 -- Broken implementation? - 11/08/07 01:31 PM
From mIRC:

Quote:

MD5 of $null: d41d8cd98f00b204e9800998ecf8427e
MD5 of A: 7fc56270e7a70fa81a5935b72eacbe29
MD5 of a: 0cc175b9c0f1b6a831c399e269772661
MD5 of 863: 19b650660b253761af189682e03501dd


Quote:

-bash-3.1$ echo $NUL[EOL] | md5sum && echo "A" | md5sum && echo "a" | md5sum && echo "863" | md5sum
d41d8cd98f00b204e9800998ecf8427e - null
bf072e9119077b4e76437a93986787ef - A
60b725f10c9c85c70d97880dfe8191b3 - a
89f6a0bff21f3bb3f1fa73bf8391f25a - 863


mIRC only returns the correct MD% checksum for $null?

Am I missing something here?


Posted By: qwerty Re: $md5 -- Broken implementation? - 11/08/07 01:51 PM
Apparently there's something wrong with your tests in bash, as a bunch of online md5 hash calculators I tried, such as this and this, agree with mirc.
Posted By: Collective Re: $md5 -- Broken implementation? - 11/08/07 01:57 PM
qwerty- is correct. The problem is that "echo" appends a Line Feed to the output. If you use the -n switch for echo the result will agree with mIRC.
© mIRC Discussion Forums