What they mean: Encoding, Encryption & Hashing

What they mean: Encoding, Encryption & Hashing
Spread the love

Software development can feel complicated, especially with all these terms, like hashing, encryption, and encoding. But let’s break them down into simple words to understand what they are doing.

Hashing
Hashing is like turning something into a code that can’t be turned back to the original. It’s a one-way process, so you can’t reverse it to find the original data. Think of it as pressing some clay into a unique shape—once it’s done, you can’t exactly return the clay’s original state.

When you hash something, you get a unique string or “fingerprint” of that data. The same data will always give you the same hash. But if you change even one small part of the data, the hash will be completely different. That’s why hashing is excellent for checking if something has been tampered with.

For example, you get a string if you have a file and hash it. If someone changes the file slightly, the new hash will look very different. This is why hashing is often used to verify file integrity.

In technical terms, there’s a hash collision (when two different pieces of data result in the same hash). Still, cryptographic hash functions are designed so that collisions are rare and difficult to produce.

Encryption
Encryption is all about security and privacy. This process scrambles data so that only people with the correct key can unscramble (decrypt) it and read it. Encryption is reversible—you can return the original data with the proper key.

Imagine you’re sending a message in a locked box, and only the person with the correct key can open it. Encryption is essential to ensure no one can read your data except the intended person.

For example, when you send an email or do online banking, your data is encrypted even if someone intercepts it. They can’t read it without the key.

Encoding
Encoding is much simpler. It’s just about changing the data format so that different systems can read it. Unlike encryption, encoding is not about security. It’s more like translating something into another language so that another system can understand it.

Some standard encoding formats are Base64, UTF-8, and ASCII. These are just ways of representing data in a format that different systems or devices can process.

For example, sending a photo via email might be encoded in Base64 format to ensure the email server can handle it. But anyone can decode it—no key or security is involved here.

Hashing for Passwords
One of the most common uses of hashing is for securely storing passwords. When you create an account on a website and enter a password, the system doesn’t store the password in the database. Instead, it hashes the password and stores the hash.

When you log in, the system hashes your password and compares it to the stored hash. If the two hashes match, the system knows you entered the correct password without needing to know the actual password. This way, even if someone steals the database, they only get the hashed versions, not your actual password.

No related posts found.

Parathan Thiyagalingam Avatar

Leave a Reply

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