Implement SHA-2 hash functions: SHA-256, SHA-384, SHA-512
Add pure Rust implementations of the SHA-2 family per FIPS 180-4
in the crypto crate:
- SHA-256: 256-bit digest, 64-byte blocks, 64 rounds
- SHA-512: 512-bit digest, 128-byte blocks, 80 rounds
- SHA-384: truncated SHA-512 with different initial values
All three provide streaming (new/update/finalize) and one-shot APIs.
21 tests including NIST test vectors (empty, abc, 448-bit, 896-bit,
million-a) plus streaming and edge-case coverage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
authored by
pierrelf.com
tangled.org
0fc095c9
a469cd30