aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-24 01:26:37 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-24 01:26:37 +0300
commit46d9e1918a3d9dd1eb2983159ef132933bce9e19 (patch)
tree8c9abe55abf49b555201f09512772b9853e6551d /src
parentuse macros to get rid of repetitive code (diff)
downloadaes-tools-46d9e1918a3d9dd1eb2983159ef132933bce9e19.tar.gz
aes-tools-46d9e1918a3d9dd1eb2983159ef132933bce9e19.zip
refactoring
Diffstat (limited to 'src')
-rw-r--r--src/box.c2
-rw-r--r--src/box_aes.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/box.c b/src/box.c
index d67eeb7..7fa59d1 100644
--- a/src/box.c
+++ b/src/box.c
@@ -131,7 +131,7 @@ static AesNI_StatusCode aesni_box_encrypt_block_ctr(
output, input, err_details)))
return status;
- if (aesni_is_error(status = box->algorithm->next_counter(
+ if (aesni_is_error(status = box->algorithm->inc_block(
&box->iv, err_details)))
return status;
diff --git a/src/box_aes.c b/src/box_aes.c
index 7826ca2..4e32aea 100644
--- a/src/box_aes.c
+++ b/src/box_aes.c
@@ -63,11 +63,11 @@ static AesNI_StatusCode aesni_box_xor_block_aes(
const AesNI_BoxBlock* src,
AesNI_ErrorDetails* err_details)
{
- dest->aes_block = aesni_xor_block128(dest->aes_block, src->aes_block);
+ dest->aes_block = aesni_aes_xor_blocks(dest->aes_block, src->aes_block);
return AESNI_SUCCESS;
}
-static AesNI_StatusCode aesni_box_next_counter_aes(
+static AesNI_StatusCode aesni_box_inc_block_aes(
AesNI_BoxBlock* ctr,
AesNI_ErrorDetails* err_details)
{
@@ -179,7 +179,7 @@ AesNI_BoxAlgorithmInterface aesni_box_algorithm_aes128 =
&aesni_box_encrypt_block_aes128,
&aesni_box_decrypt_block_aes128,
&aesni_box_xor_block_aes,
- &aesni_box_next_counter_aes,
+ &aesni_box_inc_block_aes,
&aesni_box_get_block_size_aes,
&aesni_box_store_block_aes,
&aesni_box_load_block_aes,
@@ -191,7 +191,7 @@ AesNI_BoxAlgorithmInterface aesni_box_algorithm_aes192 =
&aesni_box_encrypt_block_aes192,
&aesni_box_decrypt_block_aes192,
&aesni_box_xor_block_aes,
- &aesni_box_next_counter_aes,
+ &aesni_box_inc_block_aes,
&aesni_box_get_block_size_aes,
&aesni_box_store_block_aes,
&aesni_box_load_block_aes,
@@ -203,7 +203,7 @@ AesNI_BoxAlgorithmInterface aesni_box_algorithm_aes256 =
&aesni_box_encrypt_block_aes256,
&aesni_box_decrypt_block_aes256,
&aesni_box_xor_block_aes,
- &aesni_box_next_counter_aes,
+ &aesni_box_inc_block_aes,
&aesni_box_get_block_size_aes,
&aesni_box_store_block_aes,
&aesni_box_load_block_aes,