Loading...
Compute MD5, SHA-1, SHA-256, and SHA-512 hashes for data integrity and password storage
Hash functions convert input data into a fixed-size string using mathematical algorithms. They are one-way functions - you cannot reverse the hash to get the original input. Used for data integrity, password storage, and digital signatures.
Verify data integrity, securely store passwords, create digital signatures, and generate cache keys.
Answers about algorithm differences, security properties, salt usage, and collision resistance.
Which hash algorithm should I use?
For security, use SHA-256 or SHA-512. MD5 and SHA-1 are considered broken for security purposes but may still be used for non-security applications like checksums. Always use modern algorithms for new implementations.
Can hash functions be reversed?
No, hash functions are designed to be one-way. However, for passwords, attackers use rainbow tables (precomputed hashes) to crack common passwords. Always salt passwords before hashing to prevent this.
What is the difference between MD5, SHA-1, and SHA-256?
MD5 produces 128-bit hashes (32 hex characters), SHA-1 produces 160-bit (40 hex), SHA-256 produces 256-bit (64 hex). SHA-256 is more secure and collision-resistant than MD5 and SHA-1, which have known vulnerabilities.
Are hash functions secure for passwords?
Hash functions alone are not sufficient for passwords. Use specialized password hashing algorithms like bcrypt, Argon2, or PBKDF2 which include salting and multiple iterations to slow down brute-force attacks.
Recommendations for using SHA-256 over MD5/SHA-1, salting passwords, verifying file integrity, and understanding one-way properties.
Supported algorithms and their output specifications.
MD5: 128 bits (32 hex characters)
SHA-1: 160 bits (40 hex characters)
SHA-256: 256 bits (64 hex characters)
SHA-512: 512 bits (128 hex characters)
Technical details about each supported hashing algorithm.