From 4720b5ac21163936fb47f524037a6f12ce6e6ce2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 22 Jul 2026 18:31:50 +0200 Subject: rewrite: the beginning This a giant fuck-you to myself while I have nothing (actually, tons of things) to do in a hospital. * The giant screens of preprocessor code are gone, they always sucked, fuck them. * Switched everything to the "boxes" interface as the only one remaining. * Restuctured things in aes/ so that the files they're in make at least a little bit of sense. * Removed a bunch of cruft and prematurely generic code. * This is half-baked at best: I just made sure that the tests pass. A lot of cleanup awaits. --- aesxx/utils/encrypt_bmp.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'aesxx/utils/encrypt_bmp.cpp') diff --git a/aesxx/utils/encrypt_bmp.cpp b/aesxx/utils/encrypt_bmp.cpp index 19caee4..2fcde46 100644 --- a/aesxx/utils/encrypt_bmp.cpp +++ b/aesxx/utils/encrypt_bmp.cpp @@ -35,16 +35,8 @@ void encrypt_bmp(const FileSettings& settings) { aes::Box::Key key; aes::Box::parse_key(key, algorithm, settings.get_key()); - if (settings.has_iv()) { - aes::Box::Block iv; - aes::Box::parse_block(iv, settings.get_iv()); - - aes::Box box{algorithm, key, mode, iv}; - encrypt_bmp(box, settings.get_input_path(), settings.get_output_path()); - } else { - aes::Box box{algorithm, key}; - encrypt_bmp(box, settings.get_input_path(), settings.get_output_path()); - } + aes::Box box{algorithm, key, mode, settings.get_iv()}; + encrypt_bmp(box, settings.get_input_path(), settings.get_output_path()); } } // namespace -- cgit v1.3