aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/toolkit.py
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-07-22 18:31:50 +0200
committerEgor Tensin <egor@tensin.name>2026-07-22 21:07:53 +0200
commit4720b5ac21163936fb47f524037a6f12ce6e6ce2 (patch)
tree7b1f3f7f0e4047134048bb9b9967498b6f8ead12 /test/toolkit.py
parentminor refactoring (diff)
downloadaes-tools-4720b5ac21163936fb47f524037a6f12ce6e6ce2.tar.gz
aes-tools-4720b5ac21163936fb47f524037a6f12ce6e6ce2.zip
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.
Diffstat (limited to 'test/toolkit.py')
-rw-r--r--test/toolkit.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/test/toolkit.py b/test/toolkit.py
index b6c3cd3..d14ce23 100644
--- a/test/toolkit.py
+++ b/test/toolkit.py
@@ -135,32 +135,29 @@ class Tools:
return args
@staticmethod
- def _block_settings_to_args(algorithm, mode, use_boxes=False):
- args = [
+ def _block_settings_to_args(algorithm, mode):
+ return [
"--algorithm",
str(algorithm),
"--mode",
str(mode),
]
- if use_boxes:
- args.append("--use-boxes")
- return args
@staticmethod
- def _build_block_args(algorithm, mode, inputs, use_boxes=False):
- args = Tools._block_settings_to_args(algorithm, mode, use_boxes)
+ def _build_block_args(algorithm, mode, inputs):
+ args = Tools._block_settings_to_args(algorithm, mode)
if isinstance(inputs, Iterable):
args.extend(Tools._block_inputs_to_args(iter(inputs)))
else:
args.extend(inputs.to_args())
return args
- def run_encrypt_block(self, algorithm, mode, inputs, use_boxes=False):
- args = self._build_block_args(algorithm, mode, inputs, use_boxes)
+ def run_encrypt_block(self, algorithm, mode, inputs):
+ args = self._build_block_args(algorithm, mode, inputs)
return self.run(self._ENCRYPT_BLOCK, args)
- def run_decrypt_block(self, algorithm, mode, inputs, use_boxes=False):
- args = self._build_block_args(algorithm, mode, inputs, use_boxes)
+ def run_decrypt_block(self, algorithm, mode, inputs):
+ args = self._build_block_args(algorithm, mode, inputs)
return self.run(self._DECRYPT_BLOCK, args)
@staticmethod