From 007d3cb800fd0e4b01be8a76f0cce2c795cfc89b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 9 Oct 2022 15:14:41 +0100 Subject: [crypto] Simplify internal HMAC API Simplify the internal HMAC API so that the key is provided only at the point of calling hmac_init(), and the (potentially reduced) key is stored as part of the context for later use by hmac_final(). This simplifies the calling code, and avoids the need for callers such as TLS to allocate a potentially variable length block in order to retain a copy of the unmodified key. Signed-off-by: Michael Brown --- src/include/ipxe/md4.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/include/ipxe/md4.h') diff --git a/src/include/ipxe/md4.h b/src/include/ipxe/md4.h index 8f172e626..9f6cb8a5f 100644 --- a/src/include/ipxe/md4.h +++ b/src/include/ipxe/md4.h @@ -65,6 +65,9 @@ struct md4_context { /** MD4 context size */ #define MD4_CTX_SIZE sizeof ( struct md4_context ) +/** MD4 block size */ +#define MD4_BLOCK_SIZE sizeof ( union md4_block ) + /** MD4 digest size */ #define MD4_DIGEST_SIZE sizeof ( struct md4_digest ) -- cgit v1.2.3-55-g7522