Hash, the general translation to do "hash", there is a direct transliteration of "hash", is the arbitrary length of the input (also known as pre-mapping, pre-image), through the hash algorithm, transformed into a fixed-length output, the output is the hash value. This conversion is a compression map, that is, the space of the hash value is usually much smaller than the input space, the different inputs may be hashed to the same output, but not from the hash value to uniquely determine the input value. Simply, a function that compresses messages of any length to a message digest of a fixed length.
Hash is mainly used in the field of information security encryption algorithm, it has a number of different lengths of information into a cluttered 128-bit encoding, these coded values are called hash values. It can also be said that the hash is to find a data content and data storage address mapping between
For example, the hash algorithm for string hello
Char int key = (((((27* (int) ' h ' +27) * (int) ' e ') + +) * (int) ' l ') + +) * (int) ' L ' +27) * + (int) ' o ';.
The characteristics of the array are: easy addressing, insertion and deletion difficulties, and the list is characterized by: difficult to address, insert and delete easy. Can we combine the characteristics of both to make a data structure that is easy to address, insert and delete? The answer is yes, this is the hash table we are going to mention, the hash table has a number of different implementations, and I will explain the most commonly used method-the Zipper method, which we can understand as "array of linked lists"
Java Algorithm-hash algorithm