From 95629acc2902541460698d1898175499500caecd Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 16 Jul 2019 21:04:10 -0400 Subject: add sha224 --- sha256.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sha256.h') diff --git a/sha256.h b/sha256.h index e805293..01cf08b 100644 --- a/sha256.h +++ b/sha256.h @@ -20,4 +20,15 @@ void sha256_push(sha256_t * const, const uint8_t *, size_t); void sha256_fini(sha256_t * const, uint8_t * const); void sha256(const uint8_t * const, const size_t, uint8_t * const); +#define SHA224_HASH_SIZE 28 + +typedef struct { + sha256_t ctx; +} sha224_t; + +void sha224_init(sha224_t * const); +void sha224_push(sha224_t * const, const uint8_t *, size_t); +void sha224_fini(sha224_t * const, uint8_t * const); +void sha224(const uint8_t * const, const size_t, uint8_t * const); + #endif /* SHA2_H_ */ -- cgit v1.2.3