aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/aes/include
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-07-21 18:57:25 +0200
committerEgor Tensin <egor@tensin.name>2026-07-21 18:57:25 +0200
commit27d80744b46b6476ce4761a6199e6293d41c91ab (patch)
treed30f336682a24520c628a15fc84bcfbd1501199d /aes/include
parentaes/box: remove useless interface method (diff)
downloadaes-tools-27d80744b46b6476ce4761a6199e6293d41c91ab.tar.gz
aes-tools-27d80744b46b6476ce4761a6199e6293d41c91ab.zip
minor refactoring
Diffstat (limited to 'aes/include')
-rw-r--r--aes/include/aes/box_aes.h6
-rw-r--r--aes/include/aes/box_data.h10
2 files changed, 9 insertions, 7 deletions
diff --git a/aes/include/aes/box_aes.h b/aes/include/aes/box_aes.h
index 476f692..c9b9b67 100644
--- a/aes/include/aes/box_aes.h
+++ b/aes/include/aes/box_aes.h
@@ -11,9 +11,9 @@
extern "C" {
#endif
-extern AES_BoxInterface aes128_box_interface;
-extern AES_BoxInterface aes192_box_interface;
-extern AES_BoxInterface aes256_box_interface;
+extern AES_BoxOps aes128_box_ops;
+extern AES_BoxOps aes192_box_ops;
+extern AES_BoxOps aes256_box_ops;
#ifdef __cplusplus
}
diff --git a/aes/include/aes/box_data.h b/aes/include/aes/box_data.h
index b0a82a5..3e49fa0 100644
--- a/aes/include/aes/box_data.h
+++ b/aes/include/aes/box_data.h
@@ -6,6 +6,7 @@
#pragma once
#include "aes.h"
+#include "algorithm.h"
#include "error.h"
#include "mode.h"
@@ -78,14 +79,15 @@ typedef struct {
AES_BoxFormatKey format_key;
AES_BoxEncryptBlock encrypt_block;
AES_BoxDecryptBlock decrypt_block;
-} AES_BoxInterface;
+} AES_BoxOps;
typedef struct {
- const AES_BoxInterface* algorithm;
- AES_BoxEncryptionRoundKeys encryption_keys;
- AES_BoxDecryptionRoundKeys decryption_keys;
+ AES_Algorithm algorithm;
AES_Mode mode;
AES_Block iv;
+ AES_BoxEncryptionRoundKeys encryption_keys;
+ AES_BoxDecryptionRoundKeys decryption_keys;
+ const AES_BoxOps* ops;
} AES_Box;
#ifdef __cplusplus