aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/aes128ecb_encrypt_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--utils/aes128ecb_encrypt_file.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/aes128ecb_encrypt_file.cpp b/utils/aes128ecb_encrypt_file.cpp
index c7fef82..d197ec6 100644
--- a/utils/aes128ecb_encrypt_file.cpp
+++ b/utils/aes128ecb_encrypt_file.cpp
@@ -36,15 +36,15 @@ namespace
int main(int argc, char** argv)
{
- AesNI_Block128 key;
- AesNI_Aes128_RoundKeys encryption_keys;
-
if (argc != 4)
exit_with_usage();
try
{
- aesni_parse_block128(&key, argv[1], aesni::ErrorDetailsThrowsInDestructor());
+ aesni::aes::Key128 key;
+ aesni::aes::from_string(key, argv[1]);
+
+ AesNI_Aes128_RoundKeys encryption_keys;
const std::string src_path(argv[2]);
const std::string dest_path(argv[3]);
@@ -60,7 +60,7 @@ int main(int argc, char** argv)
src_buf.assign(std::istreambuf_iterator<char>(src_ifs),
std::istreambuf_iterator<char>());
- aesni_aes128_expand_key(key, &encryption_keys);
+ aesni_aes128_expand_key(&key, &encryption_keys);
std::size_t dest_size;