Hashing vs encryption?
Options
- Both are reversible when you hold the right key
- Hashing is one-way; encryption can be reversed (Correct option)
- Encryption is one-way; hashing can be reversed
- Hashing always requires a secret key to work
Answer
Hashing is one-way (integrity, passwords); encryption is reversible with a key (confidentiality)
Why
Hashing turns data into a fixed-size fingerprint. You cannot get the original back from it. Used to store passwords and check that files are unchanged.
Encryption scrambles data so that only someone with the key can turn it back into the original. Used to keep data secret.
Base64 is neither: it is just a different way of writing the same data, reversible by anyone.
Remember
Hash = one-way fingerprint. Encryption = locked box with a key.