Never store plaintext passwords or reversible encryption; store a salted hash made with a slow, purpose-built algorithm such as bcrypt or Argon2 (for example with the bcrypt, argon2-cffi or pwdlib libraries), and verify by hashing the attempt and comparing.
Fast hashes such as plain SHA-256 are unsuitable because attackers can try them very quickly; add rate limiting and lockouts against brute force.
Loading…