A hash collision occurs when two different inputs produce the same hash value. Hash functions accept inputs of any size but return fixed-size outputs, so cryptographic hash functions are designed to make finding such pairs infeasible. section 4.2.1
Collision resistance is a security property, not a promise that collisions are impossible. Use standardized, peer-reviewed cryptographic hash functions rather than designing one, because secure hash-function design requires extensive mathematical analysis and scrutiny. section 4.2.1
Different inputs, fixed-size hashes
SHA-256 maps a one-byte lowercase “a,” a one-byte uppercase “A,” and a 2.6GB file to distinct 256-bit hexadecimal values. These examples illustrate the expected behavior; a collision would mean two different inputs shared one value. section 4.2.1



