Look up the output length (bytes and bits) of common hash algorithms (MD5, SHA family) for hash value storage planning.
用于预估哈希值存储空间。
| Item | Formula / Rule | Source / Standard |
|---|---|---|
| Digest length | Fixed per algorithm: MD5 128 bits, SHA-1 160, SHA-256 256, SHA-512 512 | FIPS 180-4 Secure Hash Standard / RFC 1321 |
| Serialized length | Hex length = bits / 4; Base64 length = 4 × ⌈(bits/8) / 3⌉ | RFC 4648 §4 / ISO/IEC 10118-3 |
| Collision bound | A collision is expected near 2n/2 trials by the birthday bound, with n the digest bits | NIST SP 800-107 Rev.1 §4 Hash function security |