The hash function refers to a function which may be employed for mapping arbitrary sized data to fixed sized data. So, the values which are returned in a hash function are called hash value or hash codes or popularly “hashes”. You may use them in a hash table which is a data structure that is extensively used in software for quick data lookup purposes. The hash function can speed up database lookup because it detects duplicate records in very large files. Hash functions are also used for cryptography. The cryptographic hash will let one verify input data which maps to given hash values. However, when the input data is not known, it becomes hard to reconstruct it.
Hashing refers to transformation of strings of characters to a shorter value or key of fixed length which stands for the original string of characters. This is why hashing finds use in retrieving items from databases. It is also used extensively in encryption algorithms for this reason. The hash will be much smaller that your original text. It is created using a formula in such a manner that it is highly rare that another text will generate the exact same hash value. This explains why messages sent cannot be tampered with in security systems using hash. The message sender will create a hash of this message and encrypt it. He sends it together with the message. The recipient will have to decrypt both the hash and message. He will generate another hash from this message received and then compare the two hashes. When these match, it is likely that message was not intercepted.