liveBook · Manning

Bcrypt

bcrypt is an adaptive password-hashing algorithm based on the Blowfish key schedule with a configurable work factor that makes password guessing computationally expensive.

How 3 Manning books explain it

The Well-Grounded Python Developer: How the pros use Python and Flask

bcrypt is a computationally expensive password-hashing algorithm designed to resist brute-force guessing.

How it is used
Protects stored passwords in a Flask login system against brute-force guessing and exposure of plain-text credentials.
How deep it goes
Explains why expensive hashing matters and shows its application imports and storage field, without detailing the algorithm’s internals.
Examples
Uses a blog login workflow, Flask_bcrypt imports, and a User model with a hashed_password field.
What you can do after
Apply it via Flask_bcrypt to keep plain-text passwords out of stored user records.

Read how The Well-Grounded Python Developer: How the pros use Python and Flask explains bcrypt →

Build Python Web Apps with Streamlit

bcrypt is a password-hashing library and algorithm implementation designed to make password guessing computationally expensive.

How it is used
Secures signup and login credentials in a Streamlit CRUD application backed by a users database.
How deep it goes
Explains hashing, salts, and password comparison practically, while deferring bcrypt's internal algorithm details.
Examples
Uses a Python User class, bcrypt methods, a signup form, and a database row containing a password hash.
What you can do after
Apply bcrypt to hash passwords during account creation and verify them during authentication.

Read how Build Python Web Apps with Streamlit explains bcrypt →

Grokking Web Application Security

bcrypt is an adaptive password-hashing function designed to make password guessing computationally expensive.

How it is used
Protects stored inbound-access passwords by making verification possible without retaining plaintext credentials.
How deep it goes
Explains hashing, configurable cycles, salts, peppers, and Ruby hash-and-compare functions without detailing bcrypt internals.
Examples
Demonstrates Ruby bcrypt code that generates salts, hashes passwords, reads an environment pepper, and compares recalculated hashes.
What you can do after
Apply it via BCrypt to hash and verify passwords with per-password salts and a separately stored pepper.

Read how Grokking Web Application Security explains bcrypt →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.