diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-09-01 02:53:39 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-09-01 02:53:39 +0300 |
commit | 32f8a474fdfe5ed1a5a9dfc34fa2dd41e1a6d9c1 (patch) | |
tree | 4d7eec934fd76754dfa0e28868f3f67601ba9d05 /utils/decrypt_file.cpp | |
parent | cxx: Boost.Config for compiler workarounds (diff) | |
download | aes-tools-32f8a474fdfe5ed1a5a9dfc34fa2dd41e1a6d9c1.tar.gz aes-tools-32f8a474fdfe5ed1a5a9dfc34fa2dd41e1a6d9c1.zip |
refactoring
Diffstat (limited to 'utils/decrypt_file.cpp')
-rw-r--r-- | utils/decrypt_file.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/decrypt_file.cpp b/utils/decrypt_file.cpp index 2e4da3b..d8c42c4 100644 --- a/utils/decrypt_file.cpp +++ b/utils/decrypt_file.cpp @@ -59,7 +59,7 @@ namespace template <aesni::Algorithm algorithm> bool decrypt_file_with_algorithm( - const AesNI_BoxAlgorithmParams& algorithm_params, + const AesNI_BoxKey& box_key, aesni::Mode mode, std::deque<std::string>& args) { @@ -89,7 +89,7 @@ namespace aesni_box_init( &box, algorithm, - &algorithm_params, + &box_key, mode, iv_ptr, aesni::ErrorDetailsThrowsInDestructor()); @@ -129,30 +129,30 @@ namespace if (args.empty()) return false; - AesNI_BoxAlgorithmParams algorithm_params; + AesNI_BoxKey box_key; switch (algorithm) { case AESNI_AES128: aesni::from_string<AESNI_AES128>( - algorithm_params.aes128_key, args.front()); + box_key.aes128_key, args.front()); args.pop_front(); return decrypt_file_with_algorithm<AESNI_AES128>( - algorithm_params, mode, args); + box_key, mode, args); case AESNI_AES192: aesni::from_string<AESNI_AES192>( - algorithm_params.aes192_key, args.front()); + box_key.aes192_key, args.front()); args.pop_front(); return decrypt_file_with_algorithm<AESNI_AES192>( - algorithm_params, mode, args); + box_key, mode, args); case AESNI_AES256: aesni::from_string<AESNI_AES256>( - algorithm_params.aes256_key, args.front()); + box_key.aes256_key, args.front()); args.pop_front(); return decrypt_file_with_algorithm<AESNI_AES256>( - algorithm_params, mode, args); + box_key, mode, args); default: return false; |