Cryptographic hash functions are fundamental to security. Learn about MD5, SHA families, and when to use each.
What is a Hash?
A one-way function that converts any input into fixed-length output. Impossible to reverse.
Algorithm Comparison
- MD5 - Broken, avoid
- SHA-1 - Deprecated
- SHA-256 - Standard choice
- SHA-512 - High security
Use Cases
- Password storage (with salt)
- File integrity
- Digital signatures
Conclusion
Always use modern algorithms. SHA-256 or better for new applications.