aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/aesxx
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 /aesxx
parentaes/box: remove useless interface method (diff)
downloadaes-tools-27d80744b46b6476ce4761a6199e6293d41c91ab.tar.gz
aes-tools-27d80744b46b6476ce4761a6199e6293d41c91ab.zip
minor refactoring
Diffstat (limited to 'aesxx')
-rw-r--r--aesxx/include/aesxx/box.hpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/aesxx/include/aesxx/box.hpp b/aesxx/include/aesxx/box.hpp
index e34c241..870b3a7 100644
--- a/aesxx/include/aesxx/box.hpp
+++ b/aesxx/include/aesxx/box.hpp
@@ -43,12 +43,11 @@ public:
aes_box_parse_key(&dest, algorithm, src.data(), ErrorDetailsThrowsInDestructor{});
}
- Box(Algorithm algorithm, const Key& key) : algorithm{algorithm}, mode{AES_ECB} {
- aes_box_init(&impl, algorithm, &key, mode, nullptr, ErrorDetailsThrowsInDestructor{});
+ Box(Algorithm algorithm, const Key& key) {
+ aes_box_init(&impl, algorithm, &key, AES_ECB, nullptr, ErrorDetailsThrowsInDestructor{});
}
- Box(Algorithm algorithm, const Key& key, Mode mode, const Block& iv)
- : algorithm{algorithm}, mode{mode} {
+ Box(Algorithm algorithm, const Key& key, Mode mode, const Block& iv) {
aes_box_init(&impl, algorithm, &key, mode, &iv, ErrorDetailsThrowsInDestructor{});
}
@@ -115,19 +114,16 @@ public:
}
Algorithm get_algorithm() const {
- return algorithm;
+ return impl.algorithm;
}
Mode get_mode() const {
- return mode;
+ return impl.mode;
}
private:
Key key;
- Algorithm algorithm;
- Mode mode;
-
AES_Box impl;
};