liveBook · Manning

Cryptographic hash

A cryptographic hash is a fixed-length digest computed from input data by a deterministic function designed to resist preimage, second-preimage, and collision attacks.

How 4 Manning books explain it

Software Security for Developers

A cryptographic hash function maps input data to a fixed-size digest designed to detect changes while resisting reversal and collision generation.

How it is used
Uses fixed-size digests to detect accidental changes in files and support security technologies such as HMAC, TLS, JWT, JWE, and JWS.
How deep it goes
Explains determinism, fixed-size output, one-wayness, collision resistance, verification steps, limitations, algorithm choice, and Java APIs.
Examples
Uses ACME refunds.json validation, SHA-256 file digests, Maven Central artifacts, Git commits, and Java SHA-3 examples.
What you can do after
Apply it via Java MessageDigest to detect file corruption and select safer standardized algorithms without confusing integrity with authenticity.

Read how Software Security for Developers explains cryptographic hash →

Real-World Cryptography

A hash function designed to provide security properties such as collision resistance, pre-image resistance, and second pre-image resistance.

How it is used
Uses digests to verify downloaded content, external scripts, peer-to-peer chunks, and public-key identities.
How deep it goes
Explains security properties, limitations, applications, and SHA-2 and SHA-3 constructions, but defers secret hashing and password hashing.
Examples
Shows OpenSSL file and message commands, subresource integrity, BitTorrent chunks, Tor onion addresses, and hexadecimal digests.
What you can do after
Apply it via OpenSSL to verify downloaded files and recognize when a digest alone cannot authenticate an untrusted source.

Read how Real-World Cryptography explains cryptographic hash →

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

A cryptographic hash is a one-way transformation that maps data to a fixed-format digest designed to make recovery of the original data computationally difficult.

How it is used
Protects stored login credentials while allowing submitted passwords to be checked during authentication.
How deep it goes
Explains model-level hashing and verification, but does not describe the hash algorithm or its internals.
Examples
Uses a `User` model with a write-only password property, a `hashed_password` attribute, and login-form verification.
What you can do after
Apply it via Flask-Bcrypt to store password hashes and check submitted passwords in a user model.

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

Build Python Web Apps with Streamlit

A cryptographic hash function transforms input into a fixed-looking digest such that recovering the original input is computationally difficult.

How it is used
Protects user passwords when building signup, login, and database-backed authentication features.
How deep it goes
Explains one-way behavior and demonstrates bcrypt storage and verification, without descending into hashing algorithms’ mathematics.
Examples
Uses a password-to-digest comparison, a bcrypt User model, and a database row containing a password_hash.
What you can do after
Apply bcrypt to store password hashes and verify entered passwords in a Python authentication service.

Read how Build Python Web Apps with Streamlit explains cryptographic hash →

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.