SHA
SHA
ELI5 — The Vibe Check
SHA (Secure Hash Algorithm) is a family of blenders for data. You put anything in — a document, a password, a whole movie — and get a fixed-size fingerprint out. SHA-256 gives you a 256-bit fingerprint. Change one letter in the input and the whole fingerprint changes completely.
Real Talk
SHA (Secure Hash Algorithm) is a family of cryptographic hash functions developed by the NSA. SHA-256 and SHA-512 are widely used for data integrity verification, digital signatures, and certificate fingerprinting. SHA-1 is deprecated due to collision vulnerabilities.
Show Me The Code
import { createHash } from 'crypto';
const hash = createHash('sha256')
.update('Hello, world!')
.digest('hex');
console.log(hash);
// '315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3'
When You'll Hear This
"Use SHA-256 to verify the file integrity." / "SHA-1 is broken — upgrade to SHA-256."
Related Terms
Bcrypt
Bcrypt is the gold-standard password hasher that's intentionally slow.
Certificate
A certificate is a digital ID card for a website, signed by a trusted authority.
Hashing
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.
MD5 (MD5)
MD5 is the old grandpa hash algorithm — fast, but full of holes.