diff options
author | Rob Austein <sra@hactrn.net> | 2015-05-24 15:20:53 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-05-24 15:20:53 -0400 |
commit | b7956f3c5a660e6115cc67a593b38fbd8d8aba4f (patch) | |
tree | 46bb7b3d5fb475fb3f111a9dfed16b206cc3d2f4 /aes_keywrap.c | |
parent | b932b1976b8c288686accf14e13cd499877408f9 (diff) |
Typing "!" when one meant "~" has interesting effects when bit masking.
Diffstat (limited to 'aes_keywrap.c')
-rw-r--r-- | aes_keywrap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/aes_keywrap.c b/aes_keywrap.c index 9ded0e1..a41a866 100644 --- a/aes_keywrap.c +++ b/aes_keywrap.c @@ -63,7 +63,7 @@ static hal_error_t load_kek(const uint8_t *K, const size_t K_len, const kek_acti config[3] |= AES_CONFIG_ENCDEC; break; case KEK_decrypting: - config[3] &= !AES_CONFIG_ENCDEC; + config[3] &= ~AES_CONFIG_ENCDEC; break; default: return HAL_ERROR_BAD_ARGUMENTS; |