diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-10-18 17:52:11 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-10-18 17:52:11 +0300 |
commit | 765b059fa62280d591a3d2e2342ec97455126c10 (patch) | |
tree | 4d7b5e6ce92c9b4091ed08ffc82c96286a3d68ec /include | |
parent | refactoring (diff) | |
download | aes-tools-765b059fa62280d591a3d2e2342ec97455126c10.tar.gz aes-tools-765b059fa62280d591a3d2e2342ec97455126c10.zip |
add missing `assert`s
Diffstat (limited to 'include')
-rw-r--r-- | include/aesni/mode.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/aesni/mode.h b/include/aesni/mode.h index 81e6c5c..7650ec0 100644 --- a/include/aesni/mode.h +++ b/include/aesni/mode.h @@ -127,6 +127,9 @@ static __inline AesNI_## prefix ##_Block __fastcall aesni_## prefix ##_decrypt_b AesNI_## prefix ##_Block init_vector, \ AesNI_## prefix ##_Block* next_init_vector) \ { \ + assert(encryption_keys); \ + assert(next_init_vector); \ +\ return aesni_## prefix ##_encrypt_block_OFB( \ ciphertext, encryption_keys, init_vector, next_init_vector); \ } @@ -154,6 +157,9 @@ static __inline AesNI_## prefix ##_Block __fastcall aesni_## prefix ##_decrypt_b AesNI_## prefix ##_Block init_vector, \ AesNI_## prefix ##_Block* next_init_vector) \ { \ + assert(encryption_keys); \ + assert(next_init_vector); \ +\ return aesni_## prefix ##_encrypt_block_CTR( \ ciphertext, encryption_keys, init_vector, next_init_vector); \ } |