MD5 vs SHA-1 vs SHA-256: Choosing a Hash Function
Digest sizes, collision resistance, speed, and which algorithms are safe for integrity checks versus passwords and signatures.
Integrity vs authentication vs passwords
A plain hash proves nothing about who produced the data — use HMAC with a secret key for API signatures. For password storage, use a deliberately slow KDF (bcrypt/scrypt/Argon2), never MD5/SHA.
Collision resistance today
MD5 and SHA-1 are broken for anti-tamper purposes: practical collisions exist. They remain fine for checksums of non-adversarial data (cache keys, dedup), but SHA-256 or SHA-512 is the default choice for anything security-relevant.
Verifying downloads
Publishers distribute SHA-256 sums next to installers. Compute the hash locally with the file hash tool and compare — the file never leaves your browser.