MD5, SHA-1, and SHA-256 are cryptographic hash functions used for data integrity and security. Here’s how they differ:
Algorithm | Hash Length | Speed | Security | Use Cases |
---|---|---|---|---|
MD5 | 128-bit (32 chars) | Fast | Weak (collisions found) | File integrity checks, legacy systems |
SHA-1 | 160-bit (40 chars) | Moderate | Weak (collisions found) | Old digital signatures, Git commits |
SHA-256 | 256-bit (64 chars) | Slower | Strong (secure) | Cryptography, blockchain, SSL/TLS |
Input: "Hello"