aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/aes/src
diff options
context:
space:
mode:
Diffstat (limited to 'aes/src')
-rw-r--r--aes/src/box.c18
-rw-r--r--aes/src/box_aes.c6
2 files changed, 12 insertions, 12 deletions
diff --git a/aes/src/box.c b/aes/src/box.c
index 8d2c202..3d12591 100644
--- a/aes/src/box.c
+++ b/aes/src/box.c
@@ -10,10 +10,10 @@
#include <stdlib.h>
#include <string.h>
-static const AES_BoxAlgorithmInterface* aes_box_algorithms[] = {
- &aes_box_algorithm_aes128,
- &aes_box_algorithm_aes192,
- &aes_box_algorithm_aes256,
+static const AES_BoxInterface* aes_box_interfaces[] = {
+ &aes128_box_interface,
+ &aes192_box_interface,
+ &aes256_box_interface,
};
AES_StatusCode aes_box_init(
@@ -26,7 +26,7 @@ AES_StatusCode aes_box_init(
) {
AES_StatusCode status = AES_SUCCESS;
- box->algorithm = aes_box_algorithms[algorithm];
+ box->algorithm = aes_box_interfaces[algorithm];
status = box->algorithm->calc_round_keys(
box_key, &box->encryption_keys, &box->decryption_keys, err_details
@@ -614,7 +614,7 @@ AES_StatusCode aes_box_parse_block(
if (src == NULL)
return aes_error_null_argument(err_details, "src");
- return aes_box_algorithms[algorithm]->parse_block(dest, src, err_details);
+ return aes_box_interfaces[algorithm]->parse_block(dest, src, err_details);
}
AES_StatusCode aes_box_parse_key(
@@ -628,7 +628,7 @@ AES_StatusCode aes_box_parse_key(
if (src == NULL)
return aes_error_null_argument(err_details, "src");
- return aes_box_algorithms[algorithm]->parse_key(dest, src, err_details);
+ return aes_box_interfaces[algorithm]->parse_key(dest, src, err_details);
}
AES_StatusCode aes_box_format_block(
@@ -642,7 +642,7 @@ AES_StatusCode aes_box_format_block(
if (src == NULL)
return aes_error_null_argument(err_details, "src");
- return aes_box_algorithms[algorithm]->format_block(dest, src, err_details);
+ return aes_box_interfaces[algorithm]->format_block(dest, src, err_details);
}
AES_StatusCode aes_box_format_key(
@@ -656,5 +656,5 @@ AES_StatusCode aes_box_format_key(
if (src == NULL)
return aes_error_null_argument(err_details, "src");
- return aes_box_algorithms[algorithm]->format_key(dest, src, err_details);
+ return aes_box_interfaces[algorithm]->format_key(dest, src, err_details);
}
diff --git a/aes/src/box_aes.c b/aes/src/box_aes.c
index fb858f0..8c79335 100644
--- a/aes/src/box_aes.c
+++ b/aes/src/box_aes.c
@@ -263,7 +263,7 @@ static AES_StatusCode aes_box_decrypt_block_aes256(
return AES_SUCCESS;
}
-AES_BoxAlgorithmInterface aes_box_algorithm_aes128 = {
+AES_BoxInterface aes128_box_interface = {
&aes_box_derive_params_aes128,
&aes_box_parse_block_aes,
&aes_box_parse_key_aes128,
@@ -278,7 +278,7 @@ AES_BoxAlgorithmInterface aes_box_algorithm_aes128 = {
&aes_box_load_block_aes,
};
-AES_BoxAlgorithmInterface aes_box_algorithm_aes192 = {
+AES_BoxInterface aes192_box_interface = {
&aes_box_derive_params_aes192,
&aes_box_parse_block_aes,
&aes_box_parse_key_aes192,
@@ -293,7 +293,7 @@ AES_BoxAlgorithmInterface aes_box_algorithm_aes192 = {
&aes_box_load_block_aes,
};
-AES_BoxAlgorithmInterface aes_box_algorithm_aes256 = {
+AES_BoxInterface aes256_box_interface = {
&aes_box_derive_params_aes256,
&aes_box_parse_block_aes,
&aes_box_parse_key_aes256,