aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--test/aes128cbc_decrypt_block.c1
-rw-r--r--test/aes128cbc_encrypt_block.c2
-rw-r--r--test/aes192cbc_decrypt_block.c1
-rw-r--r--test/aes192cbc_encrypt_block.c2
-rw-r--r--test/aes256cbc_decrypt_block.c1
-rw-r--r--test/aes256cbc_encrypt_block.c2
6 files changed, 6 insertions, 3 deletions
diff --git a/test/aes128cbc_decrypt_block.c b/test/aes128cbc_decrypt_block.c
index 3bd5d74..82a1b61 100644
--- a/test/aes128cbc_decrypt_block.c
+++ b/test/aes128cbc_decrypt_block.c
@@ -48,6 +48,7 @@ int main(int argc, char** argv)
continue;
}
plain = aes128cbc_decrypt(cipher, &inverted_schedule, &iv);
+ iv = cipher;
print_aes_block128(&plain);
}
diff --git a/test/aes128cbc_encrypt_block.c b/test/aes128cbc_encrypt_block.c
index e35a1bf..38faf1a 100644
--- a/test/aes128cbc_encrypt_block.c
+++ b/test/aes128cbc_encrypt_block.c
@@ -46,7 +46,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- cipher = aes128cbc_encrypt(plain, &key_schedule, &iv);
+ iv = cipher = aes128cbc_encrypt(plain, &key_schedule, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes192cbc_decrypt_block.c b/test/aes192cbc_decrypt_block.c
index 3d912ba..79eb692 100644
--- a/test/aes192cbc_decrypt_block.c
+++ b/test/aes192cbc_decrypt_block.c
@@ -49,6 +49,7 @@ int main(int argc, char** argv)
continue;
}
plain = aes192cbc_decrypt(cipher, &inverted_schedule, &iv);
+ iv = cipher;
print_aes_block128(&plain);
}
diff --git a/test/aes192cbc_encrypt_block.c b/test/aes192cbc_encrypt_block.c
index 21765f5..45f469b 100644
--- a/test/aes192cbc_encrypt_block.c
+++ b/test/aes192cbc_encrypt_block.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- cipher = aes192cbc_encrypt(plain, &key_schedule, &iv);
+ iv = cipher = aes192cbc_encrypt(plain, &key_schedule, &iv);
print_aes_block128(&cipher);
}
diff --git a/test/aes256cbc_decrypt_block.c b/test/aes256cbc_decrypt_block.c
index bb082d5..43b8091 100644
--- a/test/aes256cbc_decrypt_block.c
+++ b/test/aes256cbc_decrypt_block.c
@@ -49,6 +49,7 @@ int main(int argc, char** argv)
continue;
}
plain = aes256cbc_decrypt(cipher, &inverted_schedule, &iv);
+ iv = cipher;
print_aes_block128(&plain);
}
diff --git a/test/aes256cbc_encrypt_block.c b/test/aes256cbc_encrypt_block.c
index 1436020..2877d31 100644
--- a/test/aes256cbc_encrypt_block.c
+++ b/test/aes256cbc_encrypt_block.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
fprintf(stderr, "Invalid 128-bit AES block '%s'\n", argv[i]);
continue;
}
- cipher = aes256cbc_encrypt(plain, &key_schedule, &iv);
+ iv = cipher = aes256cbc_encrypt(plain, &key_schedule, &iv);
print_aes_block128(&cipher);
}