Hash function

A hash is a number generated from the information inside a file, maybe a clear text file. The resulting string is a fixed length, and will vary widely with small variations in input. Hashing differs from encryption and does not use a process to encrypt and decrypt data. Hashing, however, is a one-way function that scrambles plain text to produce a unique message digest. With a properly designed algorithm, it works in a one-way direction, hence there is no way to reverse the hashing process to reveal the original password:

Let's understand the working.

A user enters a password and a User ID in a browser and sends it to the authentication server over a secure channel. The server uses the User ID to look up the associated message digest. The password submitted by the user is then hashed with the same algorithm, and if the resulting message digest matches the one stored on the server, it is then authenticated.

Some of the popular Hashing Algorithms are: