lib/crypto: sha256: Add sha224() and sha224_update()
authorEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:06:36 +0000 (09:06 -0700)
committerEric Biggers <ebiggers@kernel.org>
Fri, 4 Jul 2025 17:18:53 +0000 (10:18 -0700)
commit6fa4b292204b15e0e269a9fd33bc99b5e36b6883
tree7798cc81d1595afe16918837c5cb5f9be1ab5886
parent9f97707bdb1e479ea15e14e5525164f5f1128e97
lib/crypto: sha256: Add sha224() and sha224_update()

Add a one-shot SHA-224 computation function sha224(), for consistency
with sha256(), sha384(), and sha512() which all already exist.

Similarly, add sha224_update().  While for now it's identical to
sha256_update(), omitting it makes the API harder to use since users
have to "know" which functions are the same between SHA-224 and SHA-256.
Also, this is a prerequisite for using different context types for each.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250630160645.3198-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
include/crypto/sha2.h
lib/crypto/sha256.c