Skip to main content
Loading page…
Python Mastery
Chapter 51
Lesson 2 of 4
Passwords, Secrets & Tokens
Contents
Notes
Tutor
Concept
The Password Storage Problem — A History of Failures
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
26 min
9 activities
0 of 9 done
In this lesson
1
The Password Storage Problem — A History of Failures
2
Password Hashing with passlib
3
The Rehash-on-Login Pattern
4
The `secrets` Module — Cryptographically Secure Randomness
5
Which Random Module to Use?
6
Practice: Simulate a Secure Password Reset Flow
7
Order the Password Storage Security Levels (Worst → Best)
8
Explain Salting in Your Own Words
9
Never Store Secrets in Source Code
Objectives
Learner can explain why plaintext and plain-hash password storage are dangerous
Learner can store and verify passwords using bcrypt or argon2 via passlib
Learner can generate cryptographically secure tokens and random values with the secrets module
Learner can compare sensitive tokens safely with secrets.compare_digest
Chapter 51 · Cryptography, Hashing & Security
Hashing & Integrity
Passwords, Secrets & Tokens
Encryption Essentials
Application Security & Common Vulns
Previous: Hashing & Integrity
Next: Encryption Essentials