diff options
Diffstat (limited to 'board/cr50/dcrypto/hmacsha2.h')
-rw-r--r-- | board/cr50/dcrypto/hmacsha2.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/cr50/dcrypto/hmacsha2.h b/board/cr50/dcrypto/hmacsha2.h index 45e5245a65..5e34b99189 100644 --- a/board/cr50/dcrypto/hmacsha2.h +++ b/board/cr50/dcrypto/hmacsha2.h @@ -23,6 +23,15 @@ #define SHA256_BLOCK_DWORDS (SHA256_BLOCK_SIZE / sizeof(uint64_t)) #define SHA256_DIGEST_WORDS (SHA256_DIGEST_SIZE / sizeof(uint32_t)) +#define SHA_DIGEST_WORDS (SHA_DIGEST_SIZE / sizeof(uint32_t)) +#define SHA256_DIGEST_WORDS (SHA256_DIGEST_SIZE / sizeof(uint32_t)) + +#ifdef CONFIG_UPTO_SHA512 +#define SHA_DIGEST_MAX_BYTES SHA512_DIGEST_SIZE +#else +#define SHA_DIGEST_MAX_BYTES SHA256_DIGEST_SIZE +#endif + /** * Hash contexts. Each context starts with pointer to vtable containing * functions to perform implementation specific operations. |