Cryptographic Hashes and What They're Good For
Обзор
A hash function takes any input — a single character or a multi-gigabyte file — and produces a fixed-length 'fingerprint'. Good hashes are deterministic (same input always produces same output), avalanche (tiny changes produce wildly different outputs), and one-way (you cannot recover input from hash). They're foundational to password storage, file integrity checking, blockchain, code signing, and content addressing. This tool computes MD5, SHA-1, SHA-256, and SHA-512 — covering both legacy and modern needs.
Как пользоваться (по шагам)
- 1
Paste or type the input
Text or file content — every byte matters. Even a single trailing newline produces a completely different hash.
- 2
Pick the algorithm
SHA-256 is the modern default for anything that matters. MD5 and SHA-1 are fine for non-security uses (cache keys, file change detection) but never for passwords or signing.
- 3
Compare or share the hash
Verify file integrity by matching against a publisher's published hash. For internal use, copy the hash into your logs or tracking system to fingerprint content.
Как это работает
All four hash algorithms work by processing input in fixed-size blocks through repeated mixing rounds. MD5 produces 128-bit (32 hex character) output but is cryptographically broken (collisions are easy to find). SHA-1 (160-bit) is also broken for collision resistance. SHA-256 (256-bit) and SHA-512 (512-bit) remain secure for all current applications including TLS, Bitcoin, and code signing. All computation runs locally in your browser — sensitive content never leaves your device.
Когда пригодится
Use SHA-256 to verify downloaded files match the publisher's stated hash (many open-source projects publish 'sha256sums.txt' for releases). Use MD5 or SHA-1 only for non-security tasks like cache keys or detecting accidental file changes — never for password storage or signatures. Developers use hashes to generate unique IDs from content, detect duplicates, and build Merkle trees.
Частые вопросы
Researchers have demonstrated practical 'collision attacks' — finding two different inputs that produce the same MD5 output. This breaks digital signatures and any security that depends on MD5 uniqueness. It's still fine for non-security uses like checksums of small files.