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. --- utils/aes_common.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'utils') diff --git a/utils/aes_common.hpp b/utils/aes_common.hpp index 630f143..c15565f 100644 --- a/utils/aes_common.hpp +++ b/utils/aes_common.hpp @@ -20,7 +20,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; @@ -41,7 +41,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; @@ -74,8 +74,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() @@ -106,12 +106,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; } @@ -125,8 +125,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