From 06d1d50249776a3610885619c718be9a8b730947 Mon Sep 17 00:00:00 2001 From: Julian Arevalo Date: Thu, 26 Feb 2026 15:06:51 +0100 Subject: [PATCH] aes: Add missing defines (cherry picked from commit 870fb8bca6a431c409b0607590e31382b7676829) --- include/ox_aes.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/ox_aes.h b/include/ox_aes.h index 2ee7b87f8..e41d1b2ae 100644 --- a/include/ox_aes.h +++ b/include/ox_aes.h @@ -67,8 +67,11 @@ #include "decorators.h" /** Block size of the AES in bytes. */ -#define CX_AES_BLOCK_SIZE 16 -#define CX_AES_128_KEY_LEN 16 +#define CX_AES_BLOCK_SIZE (16U) +#define CX_AES_128_KEY_LEN (16U) +#define CX_AES_192_KEY_LEN (24U) +#define CX_AES_256_KEY_LEN (32U) +#define CX_AES_MAX_KEY_LEN CX_AES_256_KEY_LEN /** * @brief AES key container. @@ -76,8 +79,8 @@ * @details Such container should be initialized with #cx_aes_init_key_no_throw. */ struct cx_aes_key_s { - uint32_t size; ///< key size - uint8_t keys[32]; ///< key value + uint32_t size; ///< key size + uint8_t keys[CX_AES_MAX_KEY_LEN]; ///< key value }; /** Convenience type. See #cx_aes_key_s. */ typedef struct cx_aes_key_s cx_aes_key_t;