aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/toolkit.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-25 05:10:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-25 05:10:40 +0300
commit8ebebf9f27070bccd4df8949aadf4ca2860bf4b1 (patch)
tree9c1c9519dcbaf6cbaabeef3d6785b2d1b7f153ca /test/toolkit.py
parentcxx: import more stuff (diff)
downloadaes-tools-8ebebf9f27070bccd4df8949aadf4ca2860bf4b1.tar.gz
aes-tools-8ebebf9f27070bccd4df8949aadf4ca2860bf4b1.zip
merge specialized block utils into general ones
... taking advantage of the new template interface.
Diffstat (limited to 'test/toolkit.py')
-rw-r--r--test/toolkit.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/toolkit.py b/test/toolkit.py
index bd50edc..39bc350 100644
--- a/test/toolkit.py
+++ b/test/toolkit.py
@@ -67,7 +67,7 @@ class ToolkitError(RuntimeError):
pass
class Tools:
- def __init__(self, search_dirs, use_sde=False):
+ def __init__(self, search_dirs, use_sde=False, use_boxes=False):
if search_dirs:
if isinstance(search_dirs, str):
os.environ['PATH'] += os.pathsep + search_dirs
@@ -76,6 +76,7 @@ class Tools:
else:
os.environ['PATH'] += os.pathsep + str(search_dirs)
self._use_sde = use_sde
+ self._use_boxes = use_boxes
self._logger = logging.getLogger(__name__)
_ENCRYPT_BLOCK = 'aes_encrypt_block.exe'
@@ -83,6 +84,8 @@ class Tools:
def run(self, tool_path, algo, mode, args):
cmd_list = ['sde', '--', tool_path] if self._use_sde else [tool_path]
+ if self._use_boxes:
+ cmd_list.append('-b')
cmd_list.extend(('-a', algo, '-m', mode, '--'))
cmd_list.extend(args)
logging.info('Trying to execute: {0}'.format(subprocess.list2cmdline(cmd_list)))