A common mistake is encrypting passwords instead of hashing them. Encryption is reversible — if the key leaks, every password leaks. Passwords must be hashed, not encrypted.
Why aren't MD5 and SHA1 enough?
These algorithms were built for speed, not password security — and that same speed lets an attacker try billions of guesses per second with a GPU.
The right algorithms
Argon2, bcrypt, and scrypt are deliberately slow and memory-hard, making mass password guessing impractically expensive.
What is salting, and why does it matter?
A unique random value added to each password before hashing, so two users with the same password don't produce the same hash — blocking rainbow-table attacks.
Use Argon2, bcrypt, or scrypt for password storage.