It is critical that sensitive data is securely sent over the network. For example, it is always a good idea to transmit user passwords over the network in a secure manner, rather than transmitting them in clear text. One way to achieve this is by using hashing.
Note
Hashing is the process of converting a plaintext string of variable length to a fixed-length string, a hash value, which serves as a digital "fingerprint" of the input string. If two hash values generated with the same hashing algorithm are different, this automatically means that the two input strings are different as well. Hashing is a one-way process—theoretically, it is impossible to determine the original string based on its hash value.
The following sections demonstrate how to add another level of security to the sample application discussed in the preceding sections by hashing user passwords. So, you will see how an existing authentication system can be modified to take advantage of hashing.