diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-17 23:25:52 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-17 23:25:52 +0300 |
commit | 44d58e0a10c7dfdb33899fa98c0eea790e0b90ce (patch) | |
tree | 646541b156ffdd88bbaa4f1fa860aed465dfce60 /examples/aes128ecb.cpp | |
parent | refactoring (diff) | |
download | aes-tools-44d58e0a10c7dfdb33899fa98c0eea790e0b90ce.tar.gz aes-tools-44d58e0a10c7dfdb33899fa98c0eea790e0b90ce.zip |
factoring out AES-specific stuff
Diffstat (limited to 'examples/aes128ecb.cpp')
-rw-r--r-- | examples/aes128ecb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/aes128ecb.cpp b/examples/aes128ecb.cpp index b33c00a..cf0d033 100644 --- a/examples/aes128ecb.cpp +++ b/examples/aes128ecb.cpp @@ -19,20 +19,20 @@ int main() { try { - aesni::Block128 plaintext; + aesni::aes::Block plaintext; make_default_plaintext(plaintext); - aesni::Block128 key; + aesni::aes::Key128 key; make_default_key(key); - aesni::KeySchedule128 encryption_schedule; - aesni_aes128_expand_key(key, &encryption_schedule); + aesni::aes::RoundKeys128 encryption_schedule; + aesni_aes128_expand_key(&key, &encryption_schedule); dump_encryption_schedule(encryption_schedule); const auto ciphertext = aesni_aes128_encrypt_block_ecb(plaintext, &encryption_schedule); dump_ciphertext(ciphertext); - aesni::KeySchedule128 decryption_schedule; + aesni::aes::RoundKeys128 decryption_schedule; aesni_aes128_derive_decryption_keys(&encryption_schedule, &decryption_schedule); dump_decryption_schedule(decryption_schedule); |