aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/block/aes_common.hpp
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 /utils/block/aes_common.hpp
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 '')
-rw-r--r--utils/block/aes_common.hpp (renamed from utils/block/cxx/aes_common.hpp)8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/block/cxx/aes_common.hpp b/utils/block/aes_common.hpp
index cd5d669..327efad 100644
--- a/utils/block/cxx/aes_common.hpp
+++ b/utils/block/aes_common.hpp
@@ -68,6 +68,7 @@ namespace
CommandLineParser(const std::string& program_name)
: m_program_name(program_name)
, m_options("Options")
+ , m_boxes(false)
{ }
bool parse_options(int argc, char** argv)
@@ -76,6 +77,7 @@ namespace
m_options.add_options()
("help,h", "show this message and exit")
+ ("box,b", po::bool_switch(&m_boxes)->default_value(false), "use the \"boxes\" interface")
("mode,m", po::value<aesni::Mode>(&m_mode)->required(), "set mode of operation")
("algorithm,a", po::value<aesni::Algorithm>(&m_algorithm)->required(), "set algorithm");
@@ -118,6 +120,11 @@ namespace
return m_algorithm;
}
+ bool use_boxes() const
+ {
+ return m_boxes;
+ }
+
std::deque<std::string> get_args()
{
return { std::make_move_iterator(m_args.begin()), std::make_move_iterator(m_args.end()) };
@@ -129,6 +136,7 @@ namespace
aesni::Mode m_mode;
aesni::Algorithm m_algorithm;
+ bool m_boxes;
std::vector<std::string> m_args;
};
}