A hash function is a deterministic function capable of transforming a given key of any type in a hash value (typically used as an address for indexing). It is essential that this function is deterministic. For the purposes of implementing Hash tables, it is also desirable that the hash function has a low computational cost.