A hash function is any function that can be used to map data of random size to data of fixed size. The values rendered by a hash function are called hash values, hash codes, digests, or just hashes. One use is a data structure termed a hash table, widely used in computer software for rapid data lookup.
It’s a mathematical formula that turns a string of characters (text or numbers) to a numeric code (usually termed a hash). These functions are so important to encryption techniques, and thus to authentication systems that require something (like a password) to be protected. They’ve been around since the 1970s.
Theoretically, a hash is one-way code, which means you can build it, but not reverse it. It’s like being able to encrypt something without being able to decrypt it. How is this helpful? When one machine generates a hash, another machine can use accurately the same inputs to generate another hash, and match the two. If they match, the inputs are the same.
Practically, modern hashes can be cracked using advanced methods. But they are still some of the most valuable tools we have for obfuscating data. Secure Hash Algorithm version 1 (SHA-1) and Message Digest version 5 (MD5) are the most popularly known modern hash functions.