summaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-08-17 16:24:34 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-08-22 14:57:35 +1000
commit7d2f5b0c43e0bb346fbf78daefd68cd0bfc56ca3 (patch)
treedb6ed9503ddf35105c4c9aa87d7d6232bf788900 /include/crypto
parent01d3aee86625bd798a5e69afb92517d5530c7ed1 (diff)
crypto: sha256 - Add sha224 support to sha256 library code
Add sha224 support to the lib/crypto/sha256 library code. This will allow us to replace both the sha256 and sha224 parts of crypto/sha256_generic.c when we remove the code duplication in further patches in this series. Suggested-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/sha256.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/sha256.h b/include/crypto/sha256.h
index 9cbb3589b8b3..a75998d65a41 100644
--- a/include/crypto/sha256.h
+++ b/include/crypto/sha256.h
@@ -26,4 +26,9 @@ extern int sha256_update(struct sha256_state *sctx, const u8 *input,
unsigned int length);
extern int sha256_final(struct sha256_state *sctx, u8 *hash);
+extern int sha224_init(struct sha256_state *sctx);
+extern int sha224_update(struct sha256_state *sctx, const u8 *input,
+ unsigned int length);
+extern int sha224_final(struct sha256_state *sctx, u8 *hash);
+
#endif /* SHA256_H */