mirror of
https://github.com/kokke/tiny-AES-c
synced 2024-11-25 06:49:37 +03:00
Merge pull request #121 from rkeene/invcipher-not-ctr
Only define InvCipher if needed
This commit is contained in:
commit
ce24c0db9d
3
aes.c
3
aes.c
@ -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)
|
|||||||
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: */
|
||||||
|
Loading…
Reference in New Issue
Block a user