This paper reviews the characteristics of the main digest algorithms, and presents a new derivation of the leftover hash lemma, using the collision probability to derive an upper bound on the statistical distance between the key and seed joint probability, and the hash bit sequence distribution. The paper discussed the use of the hash function in cryptography and presented a new derivation of the upper bound on the statistical distance between the joint distribution of the key and the seed, and the distribution of the hash bit distribution, based on the collision probability. A cryptographic hash function is used to verify whether a data file maps onto a certain hash value. On the other hand, it is difficult to reconstruct the information based on the hash value. Therefore, it is used to assure data in- integrity, and is the building block of a Hash-based Message Authentication Code (HMAC), which provide message authentication.