SHA-2
SHA-2 is a standardized family of cryptographic hash algorithms that produces fixed-length digests, including SHA-224, SHA-256, SHA-384, and SHA-512.
Software Security for Developers
SHA-2 is a family of standardized cryptographic hash functions that includes SHA-224, SHA-256, SHA-384, and SHA-512.
- How it is used
- Detects accidental data corruption by comparing a recomputed SHA-256 digest with an expected value.
- How deep it goes
- Explains family variants, deterministic digests, Java access, validation steps, and why plain hashes stop short of active-tampering protection.
- Examples
- Uses refunds.json verification, detached .sha256 files, Java MessageDigest, Maven Central artifacts, and comparisons with MD5 and SHA-1.
- What you can do after
- Diagnose accidental file corruption with SHA-256 and select HMAC when integrity must include authenticity.
Real-World Cryptography
SHA-2 is a standardized family of cryptographic hash algorithms producing digests of 224, 256, 384, or 512 bits.
- How it is used
- Positions SHA-2 as a practical family of standardized cryptographic hashes for choosing digest algorithms.
- How deep it goes
- Defines variants and sketches compression and Merkle–Damgård processing, stopping short of implementation-level detail.
- Examples
- Demonstrates SHA-224, SHA-256, SHA-384, and SHA-512 outputs for “hello world” using OpenSSL.
- What you can do after
- Operate SHA-2 variants through the OpenSSL command-line interface and distinguish their digest lengths.
Related concepts
- SHA-256includes · SHA-256 is a standardized cryptographic hash function in the SHA-2 family that maps arbitrary input data to a fixed-length 256-bit digest.
- hash functionkind of · A hash function deterministically maps input data to a value in a bounded output range, commonly for indexing, lookup, comparison, or integrity checking.
- Davies–Meyer methoduses · The Davies–Meyer method is a compression-function construction that combines a block-cipher operation with a chaining value.
- Merkle–Damgård constructionkind of · The Merkle–Damgård construction builds an arbitrary-length hash function by iteratively applying a fixed-size compression function to padded message blocks.
- cryptographic hashkind of · 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.
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.

