Which hash should I use?
| Algorithm | Output | Use it for |
|---|---|---|
| MD5 | 128 bits, 32 hex characters | Checksums and cache keys only. Broken for security: collisions are easy to make. |
| SHA-1 | 160 bits, 40 hex | Legacy systems such as older Git object IDs. Not safe against deliberate collisions. |
| SHA-256 | 256 bits, 64 hex | The default choice: file checksums, signatures, API request signing. |
| SHA-384 / SHA-512 | 384 / 512 bits | Where a longer hash is required; SHA-512 is often faster on 64-bit machines. |
Hashing passwords
Do not store passwords as plain MD5 or SHA hashes: they can be guessed billions of times a second. Use a slow password hash such as Argon2id, scrypt or bcrypt.
What is HMAC?
An HMAC combines a hash with a secret key, so only someone with the key can produce or check it. Webhooks (Stripe, GitHub, Slack) and many APIs sign requests with HMAC-SHA256. Tick HMAC with a key to compute one.
Verify a download
Choose the downloaded file, then paste the checksum from the publisher's website into Compare with a checksum. A match means the file was not corrupted or altered.