TGViewer
Coding Interview Resources Coding Interview Resources @crackingthecodinginterview · 52.1K subscribers
Post #1092 6.22K
Software development is complex, and the fancy names don't help.

Hashing vs. Encryption vs. Encoding


𝗛𝗮𝘀𝗵𝗶𝗻𝗴

This is a one-way process used for data integrity verification.

When you hash data, you get a unique string representing the original data.

It's a one-way street; once you hash something, you can't get the original data back from the hash.

While multiple values can theoretically yield the same hash, well-crafted cryptographic hash functions make such collisions incredibly rare and nearly impossible to compute.

This property makes it perfect for verifying if someone altered the data.

If even one-bit changes in the original data, the hash changes dramatically.


𝗘𝗻𝗰𝗿𝘆𝗽𝘁𝗶𝗼𝗻

This is the real deal when it comes to data security.

It uses algorithms and keys to transform readable data (plaintext) into an unreadable format (ciphertext).

Only those with the correct key can unlock (decrypt) the data and read it.

This process is reversible, unlike hashing.

Encryption is critical for protecting sensitive data from unauthorized access.


𝗘𝗻𝗰𝗼𝗱𝗶𝗻𝗴

This is all about data representation.

It converts data from one format to another, making it easier to interpret and display.

Common formats:

• Base64
• UTF-8
• ASCII

Encoding does NOT provide security! It's for data transmission and storage convenience.


One common use of hashing is for secure password storage.

When you create an account or set a password, the system hashes and stores the password in the database.

During login, the system hashes the provided password and compares it to the stored hash without revealing the password.
  • 👍 14
  • ❤ 1
More from @crackingthecodinginterview
  1. Oct 17, 2026𝗜𝗕𝗠 𝗙𝗥𝗘𝗘 𝗧𝗘𝗖𝗛 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝟮𝟬𝟮𝟲! 🎓 Explore IBM Cognitive Class and build…
  2. Oct 16, 2026𝗗𝗮𝘁𝗮 𝘀𝗰𝗶𝗲𝗻𝗰𝗲 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗪𝗶𝘁𝗵 𝗔𝗜😍 Future Ready Data Scien…
  3. Oct 16, 2026If you're working with data pipelines, these repositories are very useful: 🚀📊 ibis: A Py…
  4. Oct 13, 2026𝗧𝗢𝗣 𝗙𝗥𝗘𝗘 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝗧𝗢 𝗕𝗢𝗢𝗦𝗧 𝗬𝗢𝗨𝗥 𝗦𝗞𝗜𝗟𝗟𝗦 𝗜𝗡 𝟮𝟬𝟮𝟲! Explor…
  5. Oct 12, 2026🚀 𝗪𝗵𝗶𝗰𝗵 𝗧𝗲𝗰𝗵 𝗦𝗸𝗶𝗹𝗹 𝗪𝗶𝗹𝗹 𝗬𝗼𝘂 𝗠𝗮𝘀𝘁𝗲𝗿 𝗶𝗻 𝟮𝟬𝟮𝟲? Want to buil…
  6. Oct 9, 2026🔥 SQL Interview Case Studies (Advanced Business Scenarios) 💯 🧠 Case Study 1: Find Repea…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →