summaryrefslogtreecommitdiff
path: root/lib/crypto/sha256.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/sha256.c')
-rw-r--r--lib/crypto/sha256.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/crypto/sha256.c b/lib/crypto/sha256.c
index 573ccecbf48b..ccaae7088016 100644
--- a/lib/crypto/sha256.c
+++ b/lib/crypto/sha256.c
@@ -70,6 +70,16 @@ void sha256_final(struct sha256_state *sctx, u8 out[SHA256_DIGEST_SIZE])
}
EXPORT_SYMBOL(sha256_final);
+void sha224(const u8 *data, size_t len, u8 out[SHA224_DIGEST_SIZE])
+{
+ struct sha256_state sctx;
+
+ sha224_init(&sctx);
+ sha224_update(&sctx, data, len);
+ sha224_final(&sctx, out);
+}
+EXPORT_SYMBOL(sha224);
+
void sha256(const u8 *data, size_t len, u8 out[SHA256_DIGEST_SIZE])
{
struct sha256_state sctx;