diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-03 20:55:09 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-03 20:55:09 +0300 |
commit | 6b070da3e039d2ca7accae8489d8bc4a44ba652a (patch) | |
tree | 96fde3d04e1396cb5365d41991f3fc71498e964e /examples/aes256cbc_example.c | |
parent | add FIPS-style block parsing functions (diff) | |
download | aes-tools-6b070da3e039d2ca7accae8489d8bc4a44ba652a.tar.gz aes-tools-6b070da3e039d2ca7accae8489d8bc4a44ba652a.zip |
implement CBC wrappers in C
Diffstat (limited to 'examples/aes256cbc_example.c')
-rw-r--r-- | examples/aes256cbc_example.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/aes256cbc_example.c b/examples/aes256cbc_example.c index 816683b..bfd88fb 100644 --- a/examples/aes256cbc_example.c +++ b/examples/aes256cbc_example.c @@ -44,7 +44,7 @@ int main() printf("\t[%d]: %s\n", i, format_aes_block128_fips_style(&key_schedule.keys[i]).str); } - cypher = aes256cbc_encrypt(plain, &key_schedule, &iv); + cypher = aes256cbc_encrypt(plain, &key_schedule, iv); printf("\n"); printf("Cypher: %s\n", format_aes_block128(&cypher).str); printf(" %s\n", format_aes_block128_fips_style(&cypher).str); @@ -60,7 +60,7 @@ int main() printf("\t[%d]: %s\n", i, format_aes_block128_fips_style(&inverted_schedule.keys[i]).str); } - decrypted = aes256cbc_decrypt(cypher, &inverted_schedule, &iv); + decrypted = aes256cbc_decrypt(cypher, &inverted_schedule, iv); printf("\n"); printf("Decrypted: %s\n", format_aes_block128(&decrypted).str); printf(" %s\n", format_aes_block128_fips_style(&decrypted).str); |