From f0393777befc4ff1024513dab3ab6bad0e7ec45f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 19 May 2016 04:48:59 +0300 Subject: 'aesni' -> 'aes' --- utils/block_cmd_parser.hpp | 16 ++++----- utils/block_dumper.hpp | 64 +++++++++++++++++----------------- utils/data_parsers.hpp | 24 ++++++------- utils/decrypt_block.cpp | 86 +++++++++++++++++++++++----------------------- utils/decrypt_bmp.cpp | 18 +++++----- utils/decrypt_file.cpp | 18 +++++----- utils/encrypt_block.cpp | 86 +++++++++++++++++++++++----------------------- utils/encrypt_bmp.cpp | 18 +++++----- utils/encrypt_file.cpp | 18 +++++----- utils/file_cmd_parser.hpp | 14 ++++---- 10 files changed, 181 insertions(+), 181 deletions(-) (limited to 'utils') diff --git a/utils/block_cmd_parser.hpp b/utils/block_cmd_parser.hpp index db6da84..c343152 100644 --- a/utils/block_cmd_parser.hpp +++ b/utils/block_cmd_parser.hpp @@ -30,15 +30,15 @@ namespace class Settings { public: - aesni::Algorithm get_algorithm() const { return algorithm; } - aesni::Mode get_mode() const { return mode; } + aes::Algorithm get_algorithm() const { return algorithm; } + aes::Mode get_mode() const { return mode; } bool use_boxes() const { return use_boxes_flag; } bool verbose() const { return verbose_flag; } private: - aesni::Algorithm algorithm; - aesni::Mode mode; + aes::Algorithm algorithm; + aes::Mode mode; bool use_boxes_flag = false; bool verbose_flag = false; @@ -61,8 +61,8 @@ namespace options.add_options() ("help,h", "show this message and exit") ("use-boxes,b", po::bool_switch(&settings.use_boxes_flag)->default_value(false), "use the \"boxes\" interface") - ("mode,m", po::value(&settings.mode)->required(), "set mode of operation") - ("algorithm,a", po::value(&settings.algorithm)->required(), "set algorithm") + ("mode,m", po::value(&settings.mode)->required(), "set mode of operation") + ("algorithm,a", po::value(&settings.algorithm)->required(), "set algorithm") ("verbose,v", po::bool_switch(&settings.verbose_flag)->default_value(false), "enable verbose output"); std::vector args; @@ -112,7 +112,7 @@ namespace std::string iv_string; - if (aesni::mode_requires_initialization_vector(settings.get_mode())) + if (aes::mode_requires_initialization_vector(settings.get_mode())) { if (args.empty()) { @@ -137,7 +137,7 @@ namespace args.pop_front(); } - if (aesni::mode_requires_initialization_vector(settings.get_mode())) + if (aes::mode_requires_initialization_vector(settings.get_mode())) { inputs.emplace_back( std::move(key_string), diff --git a/utils/block_dumper.hpp b/utils/block_dumper.hpp index f41018d..d2b76bf 100644 --- a/utils/block_dumper.hpp +++ b/utils/block_dumper.hpp @@ -17,92 +17,92 @@ namespace { - template - void dump_block(const char* name, const typename aesni::Types::Block& block) + template + void dump_block(const char* name, const typename aes::Types::Block& block) { - std::cout << name << ": " << aesni::to_string(block) << "\n" << aesni::to_matrix_string(block) << "\n"; + std::cout << name << ": " << aes::to_string(block) << "\n" << aes::to_matrix_string(block) << "\n"; } - template - void dump_plaintext(const typename aesni::Types::Block& block) + template + void dump_plaintext(const typename aes::Types::Block& block) { dump_block("Plaintext", block); } - template - void dump_key(const typename aesni::Types::Key& key) + template + void dump_key(const typename aes::Types::Key& key) { - std::cout << "Key: " << aesni::to_string(key) << "\n\n"; + std::cout << "Key: " << aes::to_string(key) << "\n\n"; } - template - void dump_ciphertext(const typename aesni::Types::Block& ciphertext) + template + void dump_ciphertext(const typename aes::Types::Block& ciphertext) { dump_block("Ciphertext", ciphertext); } - template - void dump_iv(const typename aesni::Types::Block& iv) + template + void dump_iv(const typename aes::Types::Block& iv) { dump_block("Initialization vector", iv); } - template - void dump_round_keys(const char* name, const typename aesni::Types::RoundKeys& round_keys) + template + void dump_round_keys(const char* name, const typename aes::Types::RoundKeys& round_keys) { std::cout << name << ":\n"; - for (std::size_t i = 0; i < aesni::get_number_of_rounds(); ++i) - std::cout << "\t[" << i << "]: " << aesni::to_string(round_keys.keys[i]) << "\n"; + for (std::size_t i = 0; i < aes::get_number_of_rounds(); ++i) + std::cout << "\t[" << i << "]: " << aes::to_string(round_keys.keys[i]) << "\n"; std::cout << "\n"; } - template - void dump_encryption_keys(const typename aesni::Types::RoundKeys& round_keys) + template + void dump_encryption_keys(const typename aes::Types::RoundKeys& round_keys) { dump_round_keys("Encryption round keys", round_keys); } - template - void dump_decryption_keys(const typename aesni::Types::RoundKeys& round_keys) + template + void dump_decryption_keys(const typename aes::Types::RoundKeys& round_keys) { dump_round_keys("Decryption round keys", round_keys); } - template + template void dump_wrapper( - const aesni::EncryptWrapper& wrapper) + const aes::EncryptWrapper& wrapper) { dump_encryption_keys(wrapper.encryption_keys); } - template + template void dump_wrapper( - const aesni::DecryptWrapper& wrapper) + const aes::DecryptWrapper& wrapper) { dump_decryption_keys(wrapper.decryption_keys); } - template ::value>::type* = 0> + template ::value>::type* = 0> void dump_next_iv( - const aesni::EncryptWrapper& wrapper) + const aes::EncryptWrapper& wrapper) { dump_block("Next initialization vector", wrapper.iv); } - template ::value>::type* = 0> + template ::value>::type* = 0> void dump_next_iv( - const aesni::EncryptWrapper&) + const aes::EncryptWrapper&) { } - template ::value>::type* = 0> + template ::value>::type* = 0> void dump_next_iv( - const aesni::DecryptWrapper& wrapper) + const aes::DecryptWrapper& wrapper) { dump_block("Next initialization vector", wrapper.iv); } - template ::value>::type* = 0> + template ::value>::type* = 0> void dump_next_iv( - const aesni::DecryptWrapper&) + const aes::DecryptWrapper&) { } } diff --git a/utils/data_parsers.hpp b/utils/data_parsers.hpp index d081659..815a499 100644 --- a/utils/data_parsers.hpp +++ b/utils/data_parsers.hpp @@ -17,20 +17,20 @@ #include #include -static std::istream& operator>>(std::istream& is, aesni::Mode& dest) +static std::istream& operator>>(std::istream& is, aes::Mode& dest) { static const char* const argument_name = "mode"; std::string src; is >> src; - static std::map lookup_table = + static std::map lookup_table = { - { "ecb", AESNI_ECB }, - { "cbc", AESNI_CBC }, - { "cfb", AESNI_CFB }, - { "ofb", AESNI_OFB }, - { "ctr", AESNI_CTR }, + { "ecb", AES_ECB }, + { "cbc", AES_CBC }, + { "cfb", AES_CFB }, + { "ofb", AES_OFB }, + { "ctr", AES_CTR }, }; const auto it = lookup_table.find(boost::algorithm::to_lower_copy(src)); @@ -42,18 +42,18 @@ static std::istream& operator>>(std::istream& is, aesni::Mode& dest) return is; } -static std::istream& operator>>(std::istream& is, aesni::Algorithm& dest) +static std::istream& operator>>(std::istream& is, aes::Algorithm& dest) { static const char* const argument_name = "algorithm"; std::string src; is >> src; - static std::map lookup_table = + static std::map lookup_table = { - { "aes128", AESNI_AES128 }, - { "aes192", AESNI_AES192 }, - { "aes256", AESNI_AES256 }, + { "aes128", AES_AES128 }, + { "aes192", AES_AES192 }, + { "aes256", AES_AES256 }, }; const auto it = lookup_table.find(boost::algorithm::to_lower_copy(src)); diff --git a/utils/decrypt_block.cpp b/utils/decrypt_block.cpp index 7369052..2029669 100644 --- a/utils/decrypt_block.cpp +++ b/utils/decrypt_block.cpp @@ -21,33 +21,33 @@ namespace { - template + template void decrypt_with_mode( const Input& input, bool verbose = false) { - typename aesni::Types::Block iv; + typename aes::Types::Block iv; - if (aesni::ModeRequiresInitializationVector()) + if (aes::ModeRequiresInitializationVector()) { - aesni::from_string(iv, input.get_iv_string()); + aes::from_string(iv, input.get_iv_string()); if (verbose) dump_iv(iv); } - typename aesni::Types::Key key; - aesni::from_string(key, input.get_key_string()); + typename aes::Types::Key key; + aes::from_string(key, input.get_key_string()); if (verbose) dump_key(key); - aesni::DecryptWrapper decrypt(key, iv); + aes::DecryptWrapper decrypt(key, iv); if (verbose) dump_wrapper(decrypt); for (const auto& input_block_string : input.get_input_block_strings()) { - typename aesni::Types::Block ciphertext, plaintext; - aesni::from_string(ciphertext, input_block_string); + typename aes::Types::Block ciphertext, plaintext; + aes::from_string(ciphertext, input_block_string); decrypt.decrypt_block(ciphertext, plaintext); @@ -59,37 +59,37 @@ namespace } else { - std::cout << aesni::to_string(plaintext) << '\n'; + std::cout << aes::to_string(plaintext) << '\n'; } } } - template + template void decrypt_with_algorithm( - aesni::Mode mode, + aes::Mode mode, const Input& input, bool verbose = false) { switch (mode) { - case AESNI_ECB: - decrypt_with_mode(input, verbose); + case AES_ECB: + decrypt_with_mode(input, verbose); break; - case AESNI_CBC: - decrypt_with_mode(input, verbose); + case AES_CBC: + decrypt_with_mode(input, verbose); break; - case AESNI_CFB: - decrypt_with_mode(input, verbose); + case AES_CFB: + decrypt_with_mode(input, verbose); break; - case AESNI_OFB: - decrypt_with_mode(input, verbose); + case AES_OFB: + decrypt_with_mode(input, verbose); break; - case AESNI_CTR: - decrypt_with_mode(input, verbose); + case AES_CTR: + decrypt_with_mode(input, verbose); break; default: @@ -99,23 +99,23 @@ namespace } void decrypt_using_cxx_api( - aesni::Algorithm algorithm, - aesni::Mode mode, + aes::Algorithm algorithm, + aes::Mode mode, const Input& input, bool verbose = false) { switch (algorithm) { - case AESNI_AES128: - decrypt_with_algorithm(mode, input, verbose); + case AES_AES128: + decrypt_with_algorithm(mode, input, verbose); break; - case AESNI_AES192: - decrypt_with_algorithm(mode, input, verbose); + case AES_AES192: + decrypt_with_algorithm(mode, input, verbose); break; - case AESNI_AES256: - decrypt_with_algorithm(mode, input, verbose); + case AES_AES256: + decrypt_with_algorithm(mode, input, verbose); break; default: @@ -125,41 +125,41 @@ namespace } void decrypt_using_particular_box( - aesni::Box& box, + aes::Box& box, const std::vector& input_block_strings) { for (const auto& input_block_string : input_block_strings) { - aesni::Box::Block ciphertext; + aes::Box::Block ciphertext; box.parse_block(ciphertext, input_block_string); - aesni::Box::Block plaintext; + aes::Box::Block plaintext; box.decrypt_block(ciphertext, plaintext); std::cout << box.format_block(plaintext) << '\n'; } } void decrypt_using_boxes( - aesni::Algorithm algorithm, - aesni::Mode mode, + aes::Algorithm algorithm, + aes::Mode mode, const Input& input) { - aesni::Box::Key key; - aesni::Box::parse_key(key, algorithm, input.get_key_string()); + aes::Box::Key key; + aes::Box::parse_key(key, algorithm, input.get_key_string()); - if (aesni::mode_requires_initialization_vector(mode)) + if (aes::mode_requires_initialization_vector(mode)) { - aesni::Box::Block iv; - aesni::Box::parse_block(iv, algorithm, input.get_iv_string()); + aes::Box::Block iv; + aes::Box::parse_block(iv, algorithm, input.get_iv_string()); decrypt_using_particular_box( - aesni::Box(algorithm, key, mode, iv), + aes::Box(algorithm, key, mode, iv), input.get_input_block_strings()); } else { decrypt_using_particular_box( - aesni::Box(algorithm, key), + aes::Box(algorithm, key), input.get_input_block_strings()); } } @@ -209,7 +209,7 @@ int main(int argc, char** argv) std::cerr << cmd_parser; return 1; } - catch (const aesni::Error& e) + catch (const aes::Error& e) { std::cerr << e; return 1; diff --git a/utils/decrypt_bmp.cpp b/utils/decrypt_bmp.cpp index c1f36bf..f098017 100644 --- a/utils/decrypt_bmp.cpp +++ b/utils/decrypt_bmp.cpp @@ -61,7 +61,7 @@ namespace } void decrypt_bmp( - aesni::Box& box, + aes::Box& box, const std::string& ciphertext_path, const std::string& plaintext_path) { @@ -91,23 +91,23 @@ namespace const auto& ciphertext_path = settings.get_input_path(); const auto& plaintext_path = settings.get_output_path(); - aesni::Box::Key key; - aesni::Box::parse_key(key, algorithm, settings.get_key_string()); + aes::Box::Key key; + aes::Box::parse_key(key, algorithm, settings.get_key_string()); - if (aesni::mode_requires_initialization_vector(mode)) + if (aes::mode_requires_initialization_vector(mode)) { - aesni::Box::Block iv; - aesni::Box::parse_block(iv, algorithm, settings.get_iv_string()); + aes::Box::Block iv; + aes::Box::parse_block(iv, algorithm, settings.get_iv_string()); decrypt_bmp( - aesni::Box(algorithm, key, mode, iv), + aes::Box(algorithm, key, mode, iv), ciphertext_path, plaintext_path); } else { decrypt_bmp( - aesni::Box(algorithm, key), + aes::Box(algorithm, key), ciphertext_path, plaintext_path); } @@ -138,7 +138,7 @@ int main(int argc, char** argv) std::cerr << cmd_parser; return 1; } - catch (const aesni::Error& e) + catch (const aes::Error& e) { std::cerr << e; return 1; diff --git a/utils/decrypt_file.cpp b/utils/decrypt_file.cpp index ad7e9d0..33083b7 100644 --- a/utils/decrypt_file.cpp +++ b/utils/decrypt_file.cpp @@ -58,7 +58,7 @@ namespace } void decrypt_file( - aesni::Box& box, + aes::Box& box, const std::string& ciphertext_path, const std::string& plaintext_path) { @@ -76,23 +76,23 @@ namespace const auto& ciphertext_path = settings.get_input_path(); const auto& plaintext_path = settings.get_output_path(); - aesni::Box::Key key; - aesni::Box::parse_key(key, algorithm, settings.get_key_string()); + aes::Box::Key key; + aes::Box::parse_key(key, algorithm, settings.get_key_string()); - if (aesni::mode_requires_initialization_vector(mode)) + if (aes::mode_requires_initialization_vector(mode)) { - aesni::Box::Block iv; - aesni::Box::parse_block(iv, algorithm, settings.get_iv_string()); + aes::Box::Block iv; + aes::Box::parse_block(iv, algorithm, settings.get_iv_string()); decrypt_file( - aesni::Box(algorithm, key, mode, iv), + aes::Box(algorithm, key, mode, iv), ciphertext_path, plaintext_path); } else { decrypt_file( - aesni::Box(algorithm, key), + aes::Box(algorithm, key), ciphertext_path, plaintext_path); } @@ -123,7 +123,7 @@ int main(int argc, char** argv) std::cerr << cmd_parser; return 1; } - catch (const aesni::Error& e) + catch (const aes::Error& e) { std::cerr << e; return 1; diff --git a/utils/encrypt_block.cpp b/utils/encrypt_block.cpp index 34b6d84..ac6a45a 100644 --- a/utils/encrypt_block.cpp +++ b/utils/encrypt_block.cpp @@ -21,33 +21,33 @@ namespace { - template + template void encrypt_with_mode( const Input& input, bool verbose = false) { - typename aesni::Types::Block iv; + typename aes::Types::Block iv; - if (aesni::ModeRequiresInitializationVector::value) + if (aes::ModeRequiresInitializationVector::value) { - aesni::from_string(iv, input.get_iv_string()); + aes::from_string(iv, input.get_iv_string()); if (verbose) dump_iv(iv); } - typename aesni::Types::Key key; - aesni::from_string(key, input.get_key_string()); + typename aes::Types::Key key; + aes::from_string(key, input.get_key_string()); if (verbose) dump_key(key); - aesni::EncryptWrapper encrypt(key, iv); + aes::EncryptWrapper encrypt(key, iv); if (verbose) dump_wrapper(encrypt); for (const auto& input_block_string : input.get_input_block_strings()) { - typename aesni::Types::Block plaintext, ciphertext; - aesni::from_string(plaintext, input_block_string); + typename aes::Types::Block plaintext, ciphertext; + aes::from_string(plaintext, input_block_string); encrypt.encrypt_block(plaintext, ciphertext); @@ -59,37 +59,37 @@ namespace } else { - std::cout << aesni::to_string(ciphertext) << '\n'; + std::cout << aes::to_string(ciphertext) << '\n'; } } } - template + template void encrypt_with_algorithm( - aesni::Mode mode, + aes::Mode mode, const Input& input, bool verbose = false) { switch (mode) { - case AESNI_ECB: - encrypt_with_mode(input, verbose); + case AES_ECB: + encrypt_with_mode(input, verbose); break; - case AESNI_CBC: - encrypt_with_mode(input, verbose); + case AES_CBC: + encrypt_with_mode(input, verbose); break; - case AESNI_CFB: - encrypt_with_mode(input, verbose); + case AES_CFB: + encrypt_with_mode(input, verbose); break; - case AESNI_OFB: - encrypt_with_mode(input, verbose); + case AES_OFB: + encrypt_with_mode(input, verbose); break; - case AESNI_CTR: - encrypt_with_mode(input, verbose); + case AES_CTR: + encrypt_with_mode(input, verbose); break; default: @@ -99,23 +99,23 @@ namespace } void encrypt_using_cxx_api( - aesni::Algorithm algorithm, - aesni::Mode mode, + aes::Algorithm algorithm, + aes::Mode mode, const Input& input, bool verbose = false) { switch (algorithm) { - case AESNI_AES128: - encrypt_with_algorithm(mode, input, verbose); + case AES_AES128: + encrypt_with_algorithm(mode, input, verbose); break; - case AESNI_AES192: - encrypt_with_algorithm(mode, input, verbose); + case AES_AES192: + encrypt_with_algorithm(mode, input, verbose); break; - case AESNI_AES256: - encrypt_with_algorithm(mode, input, verbose); + case AES_AES256: + encrypt_with_algorithm(mode, input, verbose); break; default: @@ -125,40 +125,40 @@ namespace } void encrypt_using_particular_box( - aesni::Box& box, + aes::Box& box, const std::vector& input_block_strings) { for (const auto& input_block_string : input_block_strings) { - aesni::Box::Block plaintext; + aes::Box::Block plaintext; box.parse_block(plaintext, input_block_string); - aesni::Box::Block ciphertext; + aes::Box::Block ciphertext; box.encrypt_block(plaintext, ciphertext); std::cout << box.format_block(ciphertext) << '\n'; } } void encrypt_using_boxes( - aesni::Algorithm algorithm, - aesni::Mode mode, + aes::Algorithm algorithm, + aes::Mode mode, const Input& input) { - aesni::Box::Key key; - aesni::Box::parse_key(key, algorithm, input.get_key_string()); + aes::Box::Key key; + aes::Box::parse_key(key, algorithm, input.get_key_string()); - if (aesni::mode_requires_initialization_vector(mode)) + if (aes::mode_requires_initialization_vector(mode)) { - aesni::Box::Block iv; - aesni::Box::parse_block(iv, algorithm, input.get_iv_string()); + aes::Box::Block iv; + aes::Box::parse_block(iv, algorithm, input.get_iv_string()); encrypt_using_particular_box( - aesni::Box(algorithm, key, mode, iv), input.get_input_block_strings()); + aes::Box(algorithm, key, mode, iv), input.get_input_block_strings()); } else { encrypt_using_particular_box( - aesni::Box(algorithm, key), input.get_input_block_strings()); + aes::Box(algorithm, key), input.get_input_block_strings()); } } } @@ -207,7 +207,7 @@ int main(int argc, char** argv) std::cerr << cmd_parser; return 1; } - catch (const aesni::Error& e) + catch (const aes::Error& e) { std::cerr << e; return 1; diff --git a/utils/encrypt_bmp.cpp b/utils/encrypt_bmp.cpp index ea498cb..086e14d 100644 --- a/utils/encrypt_bmp.cpp +++ b/utils/encrypt_bmp.cpp @@ -61,7 +61,7 @@ namespace } void encrypt_bmp( - aesni::Box& box, + aes::Box& box, const std::string& plaintext_path, const std::string& ciphertext_path) { @@ -91,23 +91,23 @@ namespace const auto& plaintext_path = settings.get_input_path(); const auto& ciphertext_path = settings.get_output_path(); - aesni::Box::Key key; - aesni::Box::parse_key(key, algorithm, settings.get_key_string()); + aes::Box::Key key; + aes::Box::parse_key(key, algorithm, settings.get_key_string()); - if (aesni::mode_requires_initialization_vector(mode)) + if (aes::mode_requires_initialization_vector(mode)) { - aesni::Box::Block iv; - aesni::Box::parse_block(iv, algorithm, settings.get_iv_string()); + aes::Box::Block iv; + aes::Box::parse_block(iv, algorithm, settings.get_iv_string()); encrypt_bmp( - aesni::Box(algorithm, key, mode, iv), + aes::Box(algorithm, key, mode, iv), plaintext_path, ciphertext_path); } else { encrypt_bmp( - aesni::Box(algorithm, key), + aes::Box(algorithm, key), plaintext_path, ciphertext_path); } @@ -138,7 +138,7 @@ int main(int argc, char** argv) std::cerr << cmd_parser; return 1; } - catch (const aesni::Error& e) + catch (const aes::Error& e) { std::cerr << e; return 1; diff --git a/utils/encrypt_file.cpp b/utils/encrypt_file.cpp index 3ae8744..9a3dda8 100644 --- a/utils/encrypt_file.cpp +++ b/utils/encrypt_file.cpp @@ -58,7 +58,7 @@ namespace } void encrypt_file( - aesni::Box& box, + aes::Box& box, const std::string& plaintext_path, const std::string& ciphertext_path) { @@ -76,23 +76,23 @@ namespace const auto& plaintext_path = settings.get_input_path(); const auto& ciphertext_path = settings.get_output_path(); - aesni::Box::Key key; - aesni::Box::parse_key(key, algorithm, settings.get_key_string()); + aes::Box::Key key; + aes::Box::parse_key(key, algorithm, settings.get_key_string()); - if (aesni::mode_requires_initialization_vector(mode)) + if (aes::mode_requires_initialization_vector(mode)) { - aesni::Box::Block iv; - aesni::Box::parse_block(iv, algorithm, settings.get_iv_string()); + aes::Box::Block iv; + aes::Box::parse_block(iv, algorithm, settings.get_iv_string()); encrypt_file( - aesni::Box(algorithm, key, mode, iv), + aes::Box(algorithm, key, mode, iv), plaintext_path, ciphertext_path); } else { encrypt_file( - aesni::Box(algorithm, key), + aes::Box(algorithm, key), plaintext_path, ciphertext_path); } @@ -123,7 +123,7 @@ int main(int argc, char** argv) std::cerr << cmd_parser; return 1; } - catch (const aesni::Error& e) + catch (const aes::Error& e) { std::cerr << e; return 1; diff --git a/utils/file_cmd_parser.hpp b/utils/file_cmd_parser.hpp index c8061fa..c59e05d 100644 --- a/utils/file_cmd_parser.hpp +++ b/utils/file_cmd_parser.hpp @@ -28,8 +28,8 @@ namespace public: Settings() = default; - aesni::Mode get_mode() const { return mode; } - aesni::Algorithm get_algorithm() const { return algorithm; } + aes::Mode get_mode() const { return mode; } + aes::Algorithm get_algorithm() const { return algorithm; } const std::string& get_input_path() const { return input_path; } const std::string& get_output_path() const { return output_path; } @@ -38,8 +38,8 @@ namespace const std::string& get_iv_string() const { return iv; } private: - aesni::Mode mode; - aesni::Algorithm algorithm; + aes::Mode mode; + aes::Algorithm algorithm; std::string input_path; std::string output_path; @@ -63,8 +63,8 @@ namespace options.add_options() ("help,h", "show this message and exit") - ("mode,m", po::value(&settings.mode)->required(), "set mode of operation") - ("algorithm,a", po::value(&settings.algorithm)->required(), "set algorithm") + ("mode,m", po::value(&settings.mode)->required(), "set mode of operation") + ("algorithm,a", po::value(&settings.algorithm)->required(), "set algorithm") ("input-path,i", po::value(&settings.input_path)->required(), "set input file path") ("output-path,o", po::value(&settings.output_path)->required(), "set output file path") ("key,k", po::value(&settings.key)->required(), "set encryption key") @@ -81,7 +81,7 @@ namespace po::notify(vm); - if (aesni::mode_requires_initialization_vector(settings.get_mode())) + if (aes::mode_requires_initialization_vector(settings.get_mode())) { if (!vm.count("iv")) { -- cgit v1.2.3