aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/aes_common.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-22 01:52:57 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-22 01:52:57 +0300
commit3b705c046c53ee01ba3daed0d0e7468b1a682cbc (patch)
tree65b5769aaac6b4f950a79cd2690fc30c80923571 /utils/aes_common.hpp
parentbugfix & code style (diff)
downloadaes-tools-3b705c046c53ee01ba3daed0d0e7468b1a682cbc.tar.gz
aes-tools-3b705c046c53ee01ba3daed0d0e7468b1a682cbc.zip
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.
Diffstat (limited to '')
-rw-r--r--utils/aes_common.hpp16
1 files changed, 8 insertions, 8 deletions
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 <string>
#include <vector>
-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<AesNI_BoxMode>(&m_mode)->required(), "set mode of operation")
- ("algorithm,a", po::value<AesNI_BoxAlgorithm>(&m_algorithm)->required(), "set algorithm");
+ ("mode,m", po::value<AesNI_Mode>(&m_mode)->required(), "set mode of operation")
+ ("algorithm,a", po::value<AesNI_Algorithm>(&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<std::string> m_args;
};
}