For a hashing algorithm to be suitable for cryptographic purposes, it has to fulfill three requirements:
Pre-image resistance Given a hash value, it should be difficult (such as by requiring a massive amount of computing power) to recover a message.
Collision resistance It should be difficult to find two different messages that hash to the same value.
Nonlinearity It should be difficult to create a message that hashes to any given value.
A number of hashing algorithms are available, but the most common are members of either the Message Digest (MD) or Secure Hashing Algorithm (SHA) families. The Message Digest family includes the MD4 and MD5 algorithms, which were developed by Ron Rivest. The SHA family, which contains the SHA-1 and SHA-2 algorithms, among others, is published by NIST.