aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-03 20:55:09 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-03 20:55:09 +0300
commit6b070da3e039d2ca7accae8489d8bc4a44ba652a (patch)
tree96fde3d04e1396cb5365d41991f3fc71498e964e /examples
parentadd FIPS-style block parsing functions (diff)
downloadaes-tools-6b070da3e039d2ca7accae8489d8bc4a44ba652a.tar.gz
aes-tools-6b070da3e039d2ca7accae8489d8bc4a44ba652a.zip
implement CBC wrappers in C
Diffstat (limited to 'examples')
-rw-r--r--examples/aes128cbc_example.c4
-rw-r--r--examples/aes192cbc_example.c4
-rw-r--r--examples/aes256cbc_example.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/aes128cbc_example.c b/examples/aes128cbc_example.c
index bae250b..cb5684e 100644
--- a/examples/aes128cbc_example.c
+++ b/examples/aes128cbc_example.c
@@ -43,7 +43,7 @@ int main()
printf("\t[%d]: %s\n", i, format_aes_block128_fips_style(&key_schedule.keys[i]).str);
}
- cypher = aes128cbc_encrypt(plain, &key_schedule, &iv);
+ cypher = aes128cbc_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);
@@ -59,7 +59,7 @@ int main()
printf("\t[%d]: %s\n", i, format_aes_block128_fips_style(&inverted_schedule.keys[i]).str);
}
- decrypted = aes128cbc_decrypt(cypher, &inverted_schedule, &iv);
+ decrypted = aes128cbc_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);
diff --git a/examples/aes192cbc_example.c b/examples/aes192cbc_example.c
index 4b583b6..1edff77 100644
--- a/examples/aes192cbc_example.c
+++ b/examples/aes192cbc_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 = aes192cbc_encrypt(plain, &key_schedule, &iv);
+ cypher = aes192cbc_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 = aes192cbc_decrypt(cypher, &inverted_schedule, &iv);
+ decrypted = aes192cbc_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);
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);