What is the difference between MD5 and SHA-256?+
MD5 produces a 128-bit hash and is fast but cryptographically broken - don't use it for security. SHA-256 is part of the SHA-2 family, produces a 256-bit hash, and is considered secure for most applications.
Should I use SHA-256 to hash passwords?+
No. For passwords, use a slow, salted algorithm designed for the purpose: bcrypt, Argon2, or scrypt. Fast hash algorithms like SHA-256 are vulnerable to brute-force attacks even with a salt.
Are the same input always produce the same hash?+
Yes. Hash functions are deterministic - the same input always produces the same hash. Even a single character change produces a completely different hash (the avalanche effect).
Can a hash be reversed?+
No - hashing is a one-way function. It is computationally infeasible to reverse a hash back to the original input (though rainbow table attacks can crack common passwords).