🍋
Menu
Comparison Beginner 1 min read 253 words

Hash Generator Selection Guide

Choose the right hash algorithm for checksums, passwords, content addressing, and data integrity verification.

Key Takeaways

  • Different hash algorithms serve fundamentally different purposes.
  • MD5 and SHA-1 are cryptographically broken but still acceptable for non-security checksums where speed matters and collision resistance is not critical.
  • ### Password Hashing Never use SHA-256 or MD5 for passwords — they're designed to be fast, which helps attackers.
  • The hash becomes the identifier — identical content always produces the same hash, enabling deduplication and integrity verification in a single operation.

Hash Generator Selection

Different hash algorithms serve fundamentally different purposes. Using a fast hash for passwords or a slow hash for checksums wastes either security or performance.

Checksum and Integrity Hashes

For file integrity verification and deduplication, use SHA-256 or BLAKE3. SHA-256 is universally supported and produces a 64-character hex string. BLAKE3 is 5-10x faster while being equally secure — ideal for hashing large files or many small files. MD5 and SHA-1 are cryptographically broken but still acceptable for non-security checksums where speed matters and collision resistance is not critical.

Password Hashing

Never use SHA-256 or MD5 for passwords — they're designed to be fast, which helps attackers. Use bcrypt, scrypt, or Argon2id specifically designed to be slow and memory-hard. Argon2id is the current recommendation: it resists both GPU attacks (memory-hard) and side-channel attacks. Configure the work factor so hashing takes 200-500ms on your server hardware.

Content Addressing

For content-addressable storage (like Git or IPFS), use SHA-256. The hash becomes the identifier — identical content always produces the same hash, enabling deduplication and integrity verification in a single operation. For shorter identifiers, truncate the hash (first 8-12 characters) with awareness of the birthday problem collision probability.

HMAC and Authentication

When you need to verify both integrity and authenticity (the data wasn't modified AND it came from a trusted source), use HMAC with SHA-256. HMAC combines a secret key with the hash, preventing attackers from forging valid hashes. Use this for API request signing, webhook verification, and session tokens.

관련 도구

관련 포맷

관련 가이드