Hash Algorithm Comparison
| Algorithm | Output Size | Security | Speed | MD5128 bitsBrokenFastest SHA-1160 bitsWeakFast SHA-256256 bitsStrongModerate | SHA-512 | 512 bits | Strong | Varies |
Common Use Cases
File Integrity
Verify downloads haven't been corrupted or tampered with by comparing hashes.Password Storage
Never store plaintext passwords. Hash them (with proper algorithms like bcrypt, not raw SHA-256).Data Deduplication
Quickly identify duplicate files without comparing full contents.Caching Keys
Generate cache keys from request parameters for deterministic lookups.Important Security Notes
- Always use salts when hashing passwords
- MD5 and SHA-1 should not be used for security
- Use bcrypt, scrypt, or Argon2 for password hashing