How should a password be stored in a Python application?
- A Encrypted with AES
- B Hashed with a deliberately slow algorithm such as bcrypt or argon2, with a unique salt
- C Base64 encoded
- D In plain text with restricted file permissions
Answer
Hashed with a deliberately slow algorithm such as bcrypt or argon2, with a unique salt
Hashing is one-way, so a database breach does not expose passwords. Slow algorithms make brute-forcing impractical.





