Getting Started With Node – Course

Understanding Encryption and Hashing

Let’s understand difference between encryption and hashing.


Encryption is the cryptography practice of transforming information in a way that only someone with a valid key can decrypt and read it.

Encryption is a two-way function. When you encrypt something, you’re doing so with the intention of decrypting it later.

To encrypt data, we use an algorithm also called a cipher. The algorithm uses the key (and other related things) to encrypt the information. A person with the same key can decrypt and read the information.


Hashing is the cryptography practice of using an algorithm to transform information of any size to fixed length size. This is called a hash value or hash or hash digest.

Encryption is a two-way function i.e one needs to decrypt the information whilst hashing is a one-way function i.e once the information is hashed, it can’t be transformed back to its original form. While it’s technically possible to reverse-hash it but the computing power required makes it unfeasible to do so.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.