From c033c7c7e4b5a31554639cd11cc21aeed04725a6 Mon Sep 17 00:00:00 2001 From: Roy Keene Date: Fri, 11 Jan 2019 16:36:17 +0000 Subject: Only define InvCipher if needed If AES is being compiled only for AES-CTR, don't compile InvCipher since it is not used --- aes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aes.c b/aes.c index c79a618..f0f9ac9 100644 --- a/aes.c +++ b/aes.c @@ -432,6 +432,7 @@ static void Cipher(state_t* state, uint8_t* RoundKey) AddRoundKey(Nr, state, RoundKey); } +#if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1) static void InvCipher(state_t* state,uint8_t* RoundKey) { uint8_t round = 0; @@ -456,7 +457,7 @@ static void InvCipher(state_t* state,uint8_t* RoundKey) InvSubBytes(state); AddRoundKey(0, state, RoundKey); } - +#endif // #if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1) /*****************************************************************************/ /* Public functions: */ -- cgit v1.2.3