Commit c033c7c7 authored by Roy Keene's avatar Roy Keene
Browse files

Only define InvCipher if needed

If AES is being compiled only for AES-CTR, don't compile InvCipher since it is not used
parent 0677e48a
...@@ -432,6 +432,7 @@ static void Cipher(state_t* state, uint8_t* RoundKey) ...@@ -432,6 +432,7 @@ static void Cipher(state_t* state, uint8_t* RoundKey)
AddRoundKey(Nr, state, RoundKey); AddRoundKey(Nr, state, RoundKey);
} }
#if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1)
static void InvCipher(state_t* state,uint8_t* RoundKey) static void InvCipher(state_t* state,uint8_t* RoundKey)
{ {
uint8_t round = 0; uint8_t round = 0;
...@@ -456,7 +457,7 @@ static void InvCipher(state_t* state,uint8_t* RoundKey) ...@@ -456,7 +457,7 @@ static void InvCipher(state_t* state,uint8_t* RoundKey)
InvSubBytes(state); InvSubBytes(state);
AddRoundKey(0, state, RoundKey); AddRoundKey(0, state, RoundKey);
} }
#endif // #if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1)
/*****************************************************************************/ /*****************************************************************************/
/* Public functions: */ /* Public functions: */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment