Hashing
ELI5 — The Vibe Check
Hashing is a one-way blender for data. You throw a password in, it spits out a weird string of letters and numbers, and there's no way to reverse it. Every time you hash the same word, you get the exact same weird string — great for checking passwords without ever storing them.
Real Talk
Hashing is a one-way function that maps input data to a fixed-size digest (hash). It's deterministic but irreversible. Used for password storage, data integrity checks, and digital signatures. Common algorithms: SHA-256, bcrypt, Argon2.
Show Me The Code
// Hashing a password with bcrypt
import bcrypt from 'bcrypt';
const hash = await bcrypt.hash('myPassword123', 10);
console.log(hash); // '$2b$10$...' — irreversible
const match = await bcrypt.compare('myPassword123', hash); // true
When You'll Hear This
"We never store plain passwords — we store the hash." / "The file hash changed, so it was tampered with."
Related Terms
Bcrypt
Bcrypt is the gold-standard password hasher that's intentionally slow.
MD5 (MD5)
MD5 is the old grandpa hash algorithm — fast, but full of holes.
Password Manager
A password manager remembers all your passwords so you don't have to reuse the same one everywhere.
Salt
A salt is random gibberish you add to a password before hashing it so two people with the same password get completely different hashes.
SHA (SHA)
SHA (Secure Hash Algorithm) is a family of blenders for data.