aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-10-18 17:52:11 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-10-18 17:52:11 +0300
commit765b059fa62280d591a3d2e2342ec97455126c10 (patch)
tree4d7b5e6ce92c9b4091ed08ffc82c96286a3d68ec
parentrefactoring (diff)
downloadaes-tools-765b059fa62280d591a3d2e2342ec97455126c10.tar.gz
aes-tools-765b059fa62280d591a3d2e2342ec97455126c10.zip
add missing `assert`s
-rw-r--r--include/aesni/mode.h6
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); \
}