Hash functions are functions that map a value to a key to be stored into an array. The values returned by a hash function are usually called hashes. Hash functions and their associated hash tables are used to efficiently store data in a small and nearly constant time per retrieval. A hash function should be fast, deterministic and uniform.