What a hash is
A one-way fingerprint: any input produces a fixed-length digest, the same input always produces the same digest, and no digest can be reversed into its input. Change one character and the output changes completely (the avalanche effect) — which is why hashes verify downloads, deduplicate data, key caches, and anchor digital signatures.
Which algorithm in 2026
MD5 and SHA-1 are cryptographically broken — collisions can be manufactured — so they're fine for cache keys, checksums against accidental corruption, and legacy comparisons, but must not protect anything against an adversary. SHA-256 is the working standard; SHA-512 the bigger sibling. And for passwords, none of these: password storage needs a deliberately slow algorithm (bcrypt, scrypt, Argon2) — fast hashes are exactly what attackers want you to use.
Frequently asked questions
Is MD5 still safe to use?
For integrity against accidental corruption or as a cache key, yes. For anything security-relevant — signatures, certificates, password storage — no: practical collision attacks have existed since 2004.
Can I decrypt a hash back to the original text?
No — hashing is one-way by construction. 'Cracking' a hash means guessing inputs until one matches, which is why long random inputs are effectively uncrackable and short passwords aren't.
Why does my file's hash differ from the published one?
Any difference — a corrupted download, a different file version, or trailing whitespace in text — changes the digest entirely. Re-download and compare again; matching SHA-256s mean byte-identical files.
Should I hash passwords with SHA-256?
No. General-purpose hashes are fast, and fast is fatal for passwords (GPUs try billions per second). Use a dedicated slow KDF: Argon2id, bcrypt, or scrypt with proper salts.