Hashing vs encryption.
A one-way fingerprint you can never reverse, versus a locked box you can reopen with the right key.
- In goes the password.1
Hashing drops your data into a one-way blender and you can never get it back.
- Always the same size.2
Out comes a fixed-size smoothie — same length whether you fed it a word or a novel.
- Matches the stored one.3
That is the point: to check a password, hash what was typed and compare smoothies.
- Locked, not blended.4
Encryption is different: a locked box that scrambles your data but keeps it whole.
- Click — there it is.5
With the right key you reopen the box and the exact original is sitting inside.
- Need it back? Box it.6
Pick by one question: will you ever need it back? If yes, encrypt. If never, hash.
Semicolony semicolony.dev/eli5/hashing-vs-encryption/comic