A hash function provides encryption using an algorithm and no key. A variable-length plaintext is “hashed” into a (typically) fixed-length hash value (often called a “message digest” or simply a “hash”). Hash functions are primarily used to provide integrity; if the hash of a plaintext changes, the plaintext itself has changed.
Common older hash functions include Secure Hash Algorithm 1 (SHA-1), which creates a 160-bit hash and Message Digest 5 (MD5), which creates a 128-bit hash.
Although there has been insecurities identified with MD5, it is still widely used, and its most common use is to verify the integrity of files.