Which hash do you need?
All run client-side in milliseconds — pick a fingerprint hash by output size, CRC32 for quick error checks, or bcrypt for password hashing.
MD5
128-bit fingerprint · fast · NOT for security
SHA-1
160-bit · widely used, but collision-broken since 2017
SHA-256
256-bit · the current default for integrity and signatures
SHA-384
384-bit · truncated SHA-512, used by TLS 1.3 and SRI
SHA-512
512-bit · the longest SHA-2 digest, for file checksums
SHA-3
224 to 512-bit · Keccak sponge, the FIPS 202 standard
CRC32
32-bit checksum · CRC-32 & CRC-32C · not for security
Bcrypt
Hash & verify passwords · adjustable cost · salted
What is a hash function?
A cryptographic hash takes any input and produces a fixed-size, irreversible fingerprint. The same input always yields the same hash; the smallest change in input produces a completely different hash. They're used for checksums, password storage, digital signatures, and content addressing.
A checksum like CRC32 is the lightweight cousin: it catches accidental corruption, but not deliberate tampering.
| Algorithm | Size | Security | Use for |
|---|---|---|---|
| MD5 | 128 bits | Broken | Non-security checksums only |
| SHA-1 | 160 bits | Deprecated | Legacy git, retired TLS |
| SHA-256 | 256 bits | Recommended | Signatures, TLS, blockchains |
| SHA-384 | 384 bits | Recommended | TLS 1.3, P-384 signatures, SRI |
| SHA-512 | 512 bits | Recommended | File checksums, Ed25519 |
| SHA-3 | 224–512 bits | Recommended | A SHA-2 alternative, FIPS 202 |
| CRC32 | 32 bits | Not cryptographic | Error detection: zip, PNG, S3 |
| bcrypt | adaptive | Recommended | Password storage |
Hashing passwords? Don't use these.
MD5 and SHA-* are fast on purpose — exactly what you don't want for password storage. Use the bcrypt tool instead (or scrypt / argon2).