Im trying to encode some chains to MD5 but I have noticed that:
For the chain: “123456çñ”
Some webs like
md5generator.net
return: “66f561bb6b68372213dd9768e55e1002”
And others like:
http://www.adamek.biz/md5-generator.php
7thspace.com/webmaster_tools/online_md5_encoder.html
md5.rednoize.com/
return: “9e6c9a1eeb5e00fbf4a2cd6519e0cfcb”
I’d need to encode the chains with standar md5 because I need to connect my results with other systems. which hash is the correct?
Thanks in advance
The problem I guess is in different text encodings. The string you show can’t be represented in ANSI encoding – it requires UTF-16 or UTF-8. The choice of one of the latter leads to different byte representation of the string and that produces different hashes.
Remember, MD5 hashes bytes, not characters – it’s up to you how to encode those characters as bytes before feeding bytes to MD5. If you want to interoperate with other systems you have to use the same encoding as those systems.