Uses for hashing Besides uses for lookup, there are many other uses, and many kinds of hashing functions -- study in crypto course. Recall: previous hash takes an arbitrary string and returns an integer. hash(arbitrarily long string) = integer in desired range. Could use to detect errors in transmission of file M: Transmit (M, hash(M)) -----> at other end check that M = hash(M). If not equal, almost certainly an error. For example, CRC (cyclic redundancy code) maps a file of bytes to a 32-bit integer. Used to catch transmission errors. Suppose you store a web page along with a hash of its contents. If refreshed, check if new page matches hash, and if so don't rerender. One-way hash function H: H(M) = C, a 128-bit or 256-bit integer, say. (2^267 =(approx) 10^77. Easy to compute, but not computationally feasible to find any M' such that H(M') = C. Given C, opponent cant' substitute something else for M.