From 3b705c046c53ee01ba3daed0d0e7468b1a682cbc Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 22 Jun 2015 01:52:57 +0300 Subject: boxes: a number of improvements * Algorithm interfaces are no longer required to load partial blocks, the space for which is allocated dynamically. * Padding schemes are now also separated, perhaps in the future to become a "box" parameter. Consequently, algorithm interfaces are no longer required to implement padding either. --- test/aes_common.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/aes_common.hpp b/test/aes_common.hpp index 08b92f4..78126e5 100644 --- a/test/aes_common.hpp +++ b/test/aes_common.hpp @@ -22,7 +22,7 @@ #include #include -static std::istream& operator>>(std::istream& is, AesNI_BoxMode& dest) +static std::istream& operator>>(std::istream& is, AesNI_Mode& dest) { std::string src; is >> src; @@ -43,7 +43,7 @@ static std::istream& operator>>(std::istream& is, AesNI_BoxMode& dest) return is; } -static std::istream& operator>>(std::istream& is, AesNI_BoxAlgorithm& dest) +static std::istream& operator>>(std::istream& is, AesNI_Algorithm& dest) { std::string src; is >> src; @@ -76,8 +76,8 @@ namespace m_options.add_options() ("help,h", "show this message and exit") - ("mode,m", po::value(&m_mode)->required(), "set mode of operation") - ("algorithm,a", po::value(&m_algorithm)->required(), "set algorithm"); + ("mode,m", po::value(&m_mode)->required(), "set mode of operation") + ("algorithm,a", po::value(&m_algorithm)->required(), "set algorithm"); po::options_description hidden_options; hidden_options.add_options() @@ -108,12 +108,12 @@ namespace std::cout << m_options << "\n"; } - AesNI_BoxMode get_mode() const + AesNI_Mode get_mode() const { return m_mode; } - AesNI_BoxAlgorithm get_algorithm() const + AesNI_Algorithm get_algorithm() const { return m_algorithm; } @@ -127,8 +127,8 @@ namespace const std::string m_program_name; boost::program_options::options_description m_options; - AesNI_BoxMode m_mode; - AesNI_BoxAlgorithm m_algorithm; + AesNI_Mode m_mode; + AesNI_Algorithm m_algorithm; std::vector m_args; }; } -- cgit v1.2.3