aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples/aes128cbc.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-17 18:29:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-17 18:29:40 +0300
commit0651133db30c0932877780c2f98901e4ca1072e1 (patch)
tree2b87823b4b9f4b5a75affa4b1606abb06a598c97 /examples/aes128cbc.cpp
parentfactor out 128-bit XORing (diff)
downloadaes-tools-0651133db30c0932877780c2f98901e4ca1072e1.tar.gz
aes-tools-0651133db30c0932877780c2f98901e4ca1072e1.zip
refactoring
Diffstat (limited to 'examples/aes128cbc.cpp')
-rw-r--r--examples/aes128cbc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/aes128cbc.cpp b/examples/aes128cbc.cpp
index c7e6550..5bb8c67 100644
--- a/examples/aes128cbc.cpp
+++ b/examples/aes128cbc.cpp
@@ -29,19 +29,19 @@ int main()
make_default_iv(iv);
aesni::KeySchedule128 encryption_schedule;
- aesni_expand_key_schedule128(key, &encryption_schedule);
+ aesni_aes128_expand_key(key, &encryption_schedule);
dump_encryption_schedule(encryption_schedule);
aesni::Block128 next_iv;
- const auto ciphertext = aesni_encrypt_block_cbc128(plaintext, &encryption_schedule, iv, &next_iv);
+ const auto ciphertext = aesni_aes128_encrypt_block_cbc(plaintext, &encryption_schedule, iv, &next_iv);
dump_ciphertext(ciphertext);
dump_next_iv(next_iv);
aesni::KeySchedule128 decryption_schedule;
- aesni_invert_key_schedule128(&encryption_schedule, &decryption_schedule);
+ aesni_aes128_derive_decryption_keys(&encryption_schedule, &decryption_schedule);
dump_decryption_schedule(decryption_schedule);
- aesni::Block128 decrypted = aesni_decrypt_block_cbc128(ciphertext, &decryption_schedule, iv, &next_iv);
+ aesni::Block128 decrypted = aesni_aes128_decrypt_block_cbc(ciphertext, &decryption_schedule, iv, &next_iv);
dump_decrypted(decrypted);
dump_next_iv(next_iv);