From 13a690a5a8bb5038dac47f9c7f4e76862861fcae Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 3 Apr 2019 21:46:37 -0700 Subject: [PATCH] hmac: expose HMAC_*_KEY_MAX defines --- nx/include/switch/crypto/hmac.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nx/include/switch/crypto/hmac.h b/nx/include/switch/crypto/hmac.h index 634a32b6..fdf7364e 100644 --- a/nx/include/switch/crypto/hmac.h +++ b/nx/include/switch/crypto/hmac.h @@ -23,6 +23,9 @@ typedef struct { bool finalized; } HmacSha256Context; +#define HMAC_SHA1_KEY_MAX (sizeof(((HmacSha1Context *)NULL)->key)) +#define HMAC_SHA256_KEY_MAX (sizeof(((HmacSha256Context *)NULL)->key)) + /// Initialize a HMAC-SHA256 context. void hmacSha256ContextCreate(HmacSha256Context *out, const void *key, size_t key_size); /// Updates HMAC-SHA256 context with data to hash