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.
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
- BCryptPasswordEncoderused by · BCryptPasswordEncoder is a Spring Security PasswordEncoder implementation that hashes passwords using the bcrypt password-hashing function.
- hash functionkind of · A hash function is a deterministic function that maps input data to a hash value, typically of fixed size, for uses such as lookup, indexing, comparison, or integrity checking.
- Flask-Bcryptused by · Flask-Bcrypt is a Flask extension that provides bcrypt password hashing and verification.
- password hashingkind of · Password hashing transforms a password into a one-way derived value for secure storage and later verification without retaining the original password.
- cryptographic hashproduces · A cryptographic hash is a fixed-length digest computed deterministically from input data by a function designed to resist practical preimage, second-preimage, and collision attacks.
Questions about bcrypt
What is 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.
Which Manning books explain bcrypt?
The Well-Grounded Python Developer: How the pros use Python and Flask, Build Python Web Apps with Streamlit and Grokking Web Application Security.
What is bcrypt a kind of?
Bcrypt is a kind of hash function. A hash function is a deterministic function that maps input data to a hash value, typically of fixed size, for uses such as lookup, indexing, comparison, or integrity checking.
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.


