aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples/aes128cbc.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-18 19:46:46 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-18 19:46:46 +0300
commitc61bfd12a935bea47526f360b3e6dc3c4550f94d (patch)
tree2e1d9be1fb12c0eecbf84fc016e5418f83dd1485 /examples/aes128cbc.cpp
parentcxx: implement more stuff (diff)
downloadaes-tools-c61bfd12a935bea47526f360b3e6dc3c4550f94d.tar.gz
aes-tools-c61bfd12a935bea47526f360b3e6dc3c4550f94d.zip
code style
Diffstat (limited to '')
-rw-r--r--examples/aes128cbc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/aes128cbc.cpp b/examples/aes128cbc.cpp
index b6253e6..09f13cd 100644
--- a/examples/aes128cbc.cpp
+++ b/examples/aes128cbc.cpp
@@ -28,20 +28,20 @@ int main()
aesni::aes::Block iv;
make_default_iv(iv);
- aesni::aes::RoundKeys128 encryption_schedule;
- aesni_aes128_expand_key(&key, &encryption_schedule);
- dump_encryption_schedule(encryption_schedule);
+ aesni::aes::RoundKeys128 encryption_keys;
+ aesni_aes128_expand_key(&key, &encryption_keys);
+ dump_encryption_keys(encryption_keys);
aesni::aes::Block next_iv;
- const auto ciphertext = aesni_aes128_encrypt_block_cbc(plaintext, &encryption_schedule, iv, &next_iv);
+ const auto ciphertext = aesni_aes128_encrypt_block_cbc(plaintext, &encryption_keys, iv, &next_iv);
dump_ciphertext(ciphertext);
dump_next_iv(next_iv);
- aesni::aes::RoundKeys128 decryption_schedule;
- aesni_aes128_derive_decryption_keys(&encryption_schedule, &decryption_schedule);
- dump_decryption_schedule(decryption_schedule);
+ aesni::aes::RoundKeys128 decryption_keys;
+ aesni_aes128_derive_decryption_keys(&encryption_keys, &decryption_keys);
+ dump_decryption_keys(decryption_keys);
- aesni::aes::Block decrypted = aesni_aes128_decrypt_block_cbc(ciphertext, &decryption_schedule, iv, &next_iv);
+ aesni::aes::Block decrypted = aesni_aes128_decrypt_block_cbc(ciphertext, &decryption_keys, iv, &next_iv);
dump_decrypted(decrypted);
dump_next_iv(next_iv);