Hashing
In Hashing, data is converted to the hash using some hashing function, which can be any number generated from a string or text. Various hashing algorithms are MD5 and SHA256. Data once hashed is non-reversible. The hash function can be any function that is used to map data of arbitrary size to data of fixed size. The data structure hash table is used for storing data.
Example: When you send pictures and text messages over WhatsApp over StackOverflow (posting in questions), images are sent to different servers, and text is sent to a different server for efficiency purposes. So for verifying images that the images are not tampered with between data transfers over the internet, a hashing algorithm like MD5 can be used. MD5 generates a message digest of 128 bits, while SHA1 generates a message digest of the 160-bit hash value. Hence, SHA1 is a relatively complex algorithm with better security than MD5. Another purpose for hashing is for verifying passwords for login on various websites, as shown in the image.
Encryption vs Encoding vs Hashing
Pre-Requisite: Encryption, Encoding, Hashing.
Encryption, Encoding, and Hahsing are similar kinds of things and have little difference between them. They all are used to change the format of the data or data transformation for different purposes. We will discuss them separately. Let us first discuss the definition of all these three processes and then we will move to see how they differ.