Hash functions

A hash function maps input data to a fixed-length digest. A small change in input normally produces a very different digest.

Compare reproducibility

Two parties hashing exactly the same bytes under the same algorithm should get the same digest. Different encodings or invisible whitespace change the input.

Hashing versus encryption

Hashes help check integrity and typically have no decryption operation. Encryption serves confidentiality and provides recovery of the original content using appropriate keys.