About Hash Functions
What is a Hash Function?
A cryptographic hash function takes an input (message) and produces a fixed-size string of bytes, typically a digest that appears random. The same input always produces the same hash, but even a small change creates a completely different output.
Supported Algorithms
- MD5: 128-bit hash (legacy, not for security)
- SHA-1: 160-bit hash (deprecated for security)
- SHA-256: 256-bit hash (widely used, secure)
- SHA-384: 384-bit hash (high security)
- SHA-512: 512-bit hash (highest security)
Common Use Cases
- File integrity verification (checksums)
- Password storage (with proper salting)
- Digital signatures
- Data deduplication
- Blockchain and cryptocurrency
- Certificate validation
Security Note: MD5 and SHA-1 are considered cryptographically broken. Use SHA-256 or higher for security-sensitive applications.
Algorithm Comparison
| Algorithm | Output Size | Security | Speed |
|---|---|---|---|
| MD5 | 128 bits | Broken | Very Fast |
| SHA-1 | 160 bits | Deprecated | Fast |
| SHA-256 | 256 bits | Secure | Medium |
| SHA-384 | 384 bits | Very Secure | Medium |
| SHA-512 | 512 bits | Highest | Slower |
Frequently Asked Questions
Can hash functions be reversed?
No, cryptographic hash functions are designed to be one-way. You cannot reverse a hash to get the original input. This is why they're used for password storage.
Why do I get the same hash for the same input?
Hash functions are deterministic - the same input will always produce the same output. This property makes them useful for data verification.
Which algorithm should I use?
For security purposes, use SHA-256 or higher. MD5 and SHA-1 are only suitable for non-security checksums or legacy compatibility.
Is my data safe?
Yes, all hash generation happens locally in your browser using the Web Crypto API. Your data never leaves your device.