What is a Hash?
A cryptographic hash function is an algorithm that takes an input (or 'message') and returns a fixed-size string of characters, which is typically a hexadecimal number.
Key property: It's a one-way street. You can easily turn data into a hash, but you cannot turn a hash back into the original data.
MD5 (Message Digest 5)
Designed in 1991, MD5 was once the gold standard. However, it is now considered broken and insecure.
- Vulnerability: "Collisions" (where two different inputs produce the same hash) can be generated in seconds on a modern laptop.
- Best for: Checking file integrity against accidental corruption, NOT for security.
SHA-1 (Secure Hash Algorithm 1)
Like MD5, SHA-1 is no longer considered secure against well-funded attackers. Major browsers stopped accepting SHA-1 SSL certificates in 2017.
SHA-256
Part of the SHA-2 family, SHA-256 is currently the industry standard. It is used in everything from SSL certificates to Bitcoin. To date, there are no known successful attacks against SHA-256.
Use Cases for Developers
- File Verification: Ensuring a downloaded file hasn't been tampered with.
- Database Indexing: Using hashes to quickly look up large blobs of data.
- Password Storage: (Note: Always use a 'Salt' and a slow hashing algorithm like Argon2 or bcrypt for passwords, not raw SHA-256).
Generate your own hashes safely with our Hash Generator.