Cryptographic hash
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.
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.
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 →
Fundamentals of Cybersecurity
A cryptographic hash function is an algorithm that maps arbitrary-length input to a fixed-length digest while providing properties such as one-wayness and collision resistance.
- How it is used
- Verifies the integrity of messages, files, database records, and logs by detecting changes.
- How deep it goes
- Defines fixed-length digests and one-way hashing, explains verification, and compares algorithms without detailing their internals.
- Examples
- Uses an Alice-to-Bob message, a downloaded file with a SHA-256 checksum, and database records or logs.
- What you can do after
- Apply a hashing tool to compare a downloaded file’s digest with its published checksum and detect changes.
Read how Fundamentals of Cybersecurity explains cryptographic hash →
Kargo in Action
A digest is a content-derived identifier, typically a cryptographic hash, that uniquely identifies an artifact version.
- How it is used
- Identifies the artifact version selected for promotion despite mutable tags, preserving a traceable identity across environments.
- How deep it goes
- Explains tag-to-digest resolution and shows the recorded fields; stops short of cryptographic algorithms or hash computation.
- Examples
- Shows an illustrative Freight resource and follows a tagged container image from registry discovery through a dev promotion.
- What you can do after
- Diagnose/debug with it by comparing a promoted Freight’s digest with its readable tag and checking Stage lineage after promotion.
Also covered in
- ASP.NET Core in Action, 3e
- Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools
- Think Distributed Systems
What to know first
- encryptionEncryption is the cryptographic transformation of readable data into ciphertext that requires appropriate decryption information to recover the original data.
- hash functionA 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.
- SHA-2SHA-2 is a standardized family of cryptographic hash algorithms that produces fixed-length digests, including SHA-224, SHA-256, SHA-384, and SHA-512.
- data integrityData integrity is the property of data being accurate, complete, consistent, and valid throughout its storage, processing, and transfer.
Related concepts
- hash functionproduced by · 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.
- data corruptionaddresses · Data corruption is the unintended alteration, loss, or damage of data that makes it inaccurate, invalid, inconsistent, or unusable.
- Freightused by · Freight is a Kargo immutable unit representing a tracked artifact version or collection of artifact versions.
- gitused by · Git is a distributed version-control system for recording changes to files and coordinating work across repositories.
- hash valueproduces · A hash value is a deterministic, typically fixed-size value produced by applying a hash function to input data, often for lookup, comparison, identification, or integrity checking.
- hashCode methodcontrasts with · The hashCode method is a Java Object method that returns an integer hash value consistent with the object's equality contract and usable by hash-based collections.
Questions about cryptographic hash
What is cryptographic hash?
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.
Which Manning books explain cryptographic hash?
Software Security for Developers, Real-World Cryptography, The Well-Grounded Python Developer: How the pros use Python and Flask, Build Python Web Apps with Streamlit, Fundamentals of Cybersecurity and Kargo in Action.
What should I know before learning cryptographic hash?
Manning books that teach cryptographic hash usually introduce encryption, hash function, SHA-2 and data integrity first.
What is the difference between cryptographic hash and hashCode method?
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. The hashCode method is a Java Object method that returns an integer hash value consistent with the object's equality contract and usable by hash-based collections.
What is cryptographic hash also called?
Cryptographic hash is also called digest.
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.





