Web Security · Junior · Question 54 of 75
How should passwords be stored in a database?
- 1Hashed once with MD5 or SHA-1
- ✓Correct answer: Hashed with a slow algorithm made for passwords, like Argon2id or bcrypt, with a unique salt
- 3Encrypted with AES, so they can be decrypted if a user forgets them
Explanation
Fast hashes can be brute-forced at billions of guesses per second. Password hashing algorithms are slow by design and include salts against precomputed tables.