Hashing Basics & History
A History of Hashing
A generic hash function is a special type of programming function that is used to map data of arbitrary size to data of a fixed size. Hash functions originated from a need to compress data in order to reduce the amount of memory required to store large files. The most popular use case for a hash function is for another specific data structure called a hash table, which is widely used for rapid data lookup. Hash functions help speed up a table or database lookup by detecting any two exact same hashes; they also help minify tags for enormous files such as mp3s, PDFs or images in order to make working with these rather large file types manageable. For rapid identification, a key requirement of hash functions is that they output a fixed-length string of alphanumeric characters.
While the core reason for the inception of a hash function came from a need compress content, a secondary benefit soon became a staple of hashing: singularly-unique identifiers. Ideally, when hashing multiple messages, no two different messages should ever return the same hash. Two different hashed messages resulting in the same output hash is called a collision. From a database management perspective, this would mean that two different objects end up being stored in the same cell — no good if one is looking to define singularly-unique identifiers. If we consider a hash…