Differing files may give the same md5.
in reply to Re: Digest::MD5::md5_hex giving different values on different machines
in thread Digest::MD5::md5_hex giving different values on different machines
For any hash function, there will be collisions, infinite collisions in fact. (Informal proof: Once you've hashed as many distinct files as you have total hash values, if you hash yet another distinct file, you must have a collision somewhere.)
The key here is a Cryptographic Hash Function.
Are you trying to detect accidental differences or malicious ones?
MD5 is very good at detecting the former with high confidence. Given the published research, it isn't as good for the later.