Hashing and Validation
suggest changeA cryptographic hash function is expected to have three properties: it is deterministic, it is collision-resistant, and it is preimage-resistant.
Consistency: The same input always produces the same output. If X = Y, then f(X) = f(Y).
Collision resistance: It should be computationally infeasible to find two different inputs with the same output. That is not the same as "no collisions exist." Every hash with a fixed-size output collides on some pairs of inputs, because there are more possible inputs than outputs. MD5 and SHA-1 are not collision-resistant: practical collisions are known. SHA-256 and SHA-512 are still believed to be collision-resistant.
Irreversibility: Given only f(X), it should be infeasible to recover X other than by searching possible inputs. There should be no practical function f1 such that f1(f(X)) = X.