Which statement about hashing vs encryption is correct?
- 1Both are reversible with the right key
- 2Hashing is one-way; encryption is reversible with a key✓ correct
- 3Encryption is one-way; hashing is reversible
- 4They are the same thing
Hashing is a one-way function: you can compute a hash from data, but you cannot reverse it to recover the original. Use it for integrity verification and password storage (with a slow Key Derivation Function like argon2id). Encryption is reversible: anyone with the correct key can decrypt the ciphertext back to plaintext. Use it when you legitimately need to recover the original data (e.g. encrypting a stored API key). Confusing the two — e.g. encrypting passwords instead of hashing them — is a common mistake that leaves you exposed if the key is ever compromised.
Hashing is one-way; encryption is reversible with a key.
References