A hash function takes a string of any length, and map it to an integer
within a range,
. It is not an injection because more than
one strings can map to the same integer value. This is because there is
an infinite number of strings (more than
), but each one has an
integer hash value between 0 and
inclusively.
Many hash functions, including MD5, are surjective.
Copyright © 2006-10-28 by Tak Auyeung