Skip to main content


Hashing vs Encryption

  • Encryption. Two-way function, reversible. We can go back and obtain the original text if we have the key. A secret key is required. Used to transfer data safely. Eg: RSA, AES
    • Symmetric: same key is used for encrypting and decrypting.
    • Asymmetric (aka public-key).
  • Hashing. One-way function. We can't recover the original text. A key is not required. Used to verify data. Eg: MD5, SHA256, bcrypt, scrypt -