hash/sha512: add SHA-512/224 and SHA-512/256 variants

This commit is contained in:
Lucas Gabriel Vuotto 2024-06-17 14:41:20 +00:00
parent d66daa8938
commit 9ba30dbe41
5 changed files with 197 additions and 4 deletions

View file

@ -35,6 +35,10 @@
#define LC_SHA384_HASHLEN 48
#define LC_SHA512_BLOCKLEN 128
#define LC_SHA512_HASHLEN 64
#define LC_SHA512_224_BLOCKLEN 128
#define LC_SHA512_224_HASHLEN 28
#define LC_SHA512_256_BLOCKLEN 128
#define LC_SHA512_256_HASHLEN 32
/* Authentitcation. */
#define LC_POLY1305_BLOCKLEN 16
@ -132,6 +136,8 @@ const struct lc_hash_impl *lc_hash_impl_sha224(void);
const struct lc_hash_impl *lc_hash_impl_sha256(void);
const struct lc_hash_impl *lc_hash_impl_sha384(void);
const struct lc_hash_impl *lc_hash_impl_sha512(void);
const struct lc_hash_impl *lc_hash_impl_sha512_224(void);
const struct lc_hash_impl *lc_hash_impl_sha512_256(void);
/*