Answer the question
In order to leave comments, you need to log in
How can you guarantee the uniqueness of the hash string for a particular file?
When developing a file hosting service, the question arose of quickly finding duplicates.
Each hashing algorithm has a chance of collisions due to a limitation on the length of the generated string.
Comparing the contents of files is expensive for large volumes, and different files can have the same sha1 / md5 amounts.
Can generate a long string from two/three or more algorithms?
How is it better?
Answer the question
In order to leave comments, you need to log in
Each hashing algorithm has a chance of collisions due to a limitation on the length of the generated string.This is an integral part of hashing itself. If you want duplicates to be impossible in principle, the length of the hash must be at least as long as the length of the original file.
SHA1 is quite unique. Collisions in MD5 are searched for in minutes, I have not heard of SHA1 and even more so SHA512.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question