Identify hash types (MD5, SHA-1, SHA-256, bcrypt, etc.)
Hash functions are one-way mathematical algorithms that convert data of any size into a fixed-size string of characters. They are fundamental to cryptography, data integrity, and password storage.
| Algorithm | Security | Recommendation |
|---|---|---|
| MD5 | Broken | Never use |
| SHA-1 | Broken | Migrate away |
| SHA-256 | Strong | Recommended |
| SHA-512 | Very Strong | High security |
| SHA-3 | Strong | Modern alternative |
| Algorithm | Security | Recommendation |
|---|---|---|
| MD5/SHA-1 (no salt) | Insecure | Never use |
| PBKDF2 | Acceptable | If others unavailable |
| bcrypt | Strong | Recommended |
| scrypt | Strong | Good choice |
| Argon2 | Excellent | Best choice |
Never use MD5, SHA-1, or SHA-256 directly for password storage. These are designed to be fast, making them vulnerable to brute-force attacks. Use purpose-built password hashing functions like bcrypt or Argon2.
Salt is random data added to passwords before hashing to prevent rainbow table attacks:
Modern password hashing functions allow configurable work factors:
$2a$10$salt+hash
$2a = variant, 10 = cost