3 ms·
Sure, the probability of a collision is exceedingly low if you use SHA256. And if you take care of hashing _the whole content_. But in many programming applica
by Tainnor 7y ago
Sure, the probability of a collision is exceedingly low if you use SHA256. And if you take care of hashing _the whole content_.
But in many programming applications (e.g. hash maps) you wouldn't use a cryptographic hash because it's too slow. Then it becomes important to design a hash function that is "good enough" and, unfortunately, it's quite easy to implement "hashCode" (or whatever your programming language calls it) in a broken way for your types and suddenly you have collisions. I've seen exactly this problem in my own code.