From be612cbab27967afcc60175ce78ea88b7108659e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 21 Jun 2016 19:51:34 +0300 Subject: fix GCC errors --- utils/block_dumper.hpp | 8 ++++---- utils/decrypt_block.cpp | 10 ++++------ utils/decrypt_bmp.cpp | 12 ++++-------- utils/decrypt_file.cpp | 12 ++++-------- utils/encrypt_block.cpp | 8 ++++---- utils/encrypt_bmp.cpp | 12 ++++-------- utils/encrypt_file.cpp | 12 ++++-------- 7 files changed, 28 insertions(+), 46 deletions(-) (limited to 'utils') diff --git a/utils/block_dumper.hpp b/utils/block_dumper.hpp index d2b76bf..d344cda 100644 --- a/utils/block_dumper.hpp +++ b/utils/block_dumper.hpp @@ -82,26 +82,26 @@ namespace dump_decryption_keys(wrapper.decryption_keys); } - template ::value>::type* = 0> + template ::value>::type* = nullptr> void dump_next_iv( const aes::EncryptWrapper& wrapper) { dump_block("Next initialization vector", wrapper.iv); } - template ::value>::type* = 0> + template ::value>::type* = nullptr> void dump_next_iv( const aes::EncryptWrapper&) { } - template ::value>::type* = 0> + template ::value>::type* = nullptr> void dump_next_iv( const aes::DecryptWrapper& wrapper) { dump_block("Next initialization vector", wrapper.iv); } - template ::value>::type* = 0> + template ::value>::type* = nullptr> void dump_next_iv( const aes::DecryptWrapper&) { } diff --git a/utils/decrypt_block.cpp b/utils/decrypt_block.cpp index 2029669..6cc9c0a 100644 --- a/utils/decrypt_block.cpp +++ b/utils/decrypt_block.cpp @@ -151,16 +151,14 @@ namespace { aes::Box::Block iv; aes::Box::parse_block(iv, algorithm, input.get_iv_string()); + aes::Box box{ algorithm, key, mode, iv }; - decrypt_using_particular_box( - aes::Box(algorithm, key, mode, iv), - input.get_input_block_strings()); + decrypt_using_particular_box(box, input.get_input_block_strings()); } else { - decrypt_using_particular_box( - aes::Box(algorithm, key), - input.get_input_block_strings()); + aes::Box box{ algorithm, key }; + decrypt_using_particular_box(box, input.get_input_block_strings()); } } } diff --git a/utils/decrypt_bmp.cpp b/utils/decrypt_bmp.cpp index f098017..1e286e6 100644 --- a/utils/decrypt_bmp.cpp +++ b/utils/decrypt_bmp.cpp @@ -98,18 +98,14 @@ namespace { aes::Box::Block iv; aes::Box::parse_block(iv, algorithm, settings.get_iv_string()); + aes::Box box{ algorithm, key, mode, iv }; - decrypt_bmp( - aes::Box(algorithm, key, mode, iv), - ciphertext_path, - plaintext_path); + decrypt_bmp(box, ciphertext_path, plaintext_path); } else { - decrypt_bmp( - aes::Box(algorithm, key), - ciphertext_path, - plaintext_path); + aes::Box box{ algorithm, key }; + decrypt_bmp(box, ciphertext_path, plaintext_path); } } } diff --git a/utils/decrypt_file.cpp b/utils/decrypt_file.cpp index 33083b7..cd955bb 100644 --- a/utils/decrypt_file.cpp +++ b/utils/decrypt_file.cpp @@ -83,18 +83,14 @@ namespace { aes::Box::Block iv; aes::Box::parse_block(iv, algorithm, settings.get_iv_string()); + aes::Box box{ algorithm, key, mode, iv }; - decrypt_file( - aes::Box(algorithm, key, mode, iv), - ciphertext_path, - plaintext_path); + decrypt_file(box, ciphertext_path, plaintext_path); } else { - decrypt_file( - aes::Box(algorithm, key), - ciphertext_path, - plaintext_path); + aes::Box box{ algorithm, key }; + decrypt_file(box, ciphertext_path, plaintext_path); } } } diff --git a/utils/encrypt_block.cpp b/utils/encrypt_block.cpp index ac6a45a..da33612 100644 --- a/utils/encrypt_block.cpp +++ b/utils/encrypt_block.cpp @@ -151,14 +151,14 @@ namespace { aes::Box::Block iv; aes::Box::parse_block(iv, algorithm, input.get_iv_string()); + aes::Box box{ algorithm, key, mode, iv }; - encrypt_using_particular_box( - aes::Box(algorithm, key, mode, iv), input.get_input_block_strings()); + encrypt_using_particular_box(box, input.get_input_block_strings()); } else { - encrypt_using_particular_box( - aes::Box(algorithm, key), input.get_input_block_strings()); + aes::Box box{ algorithm, key }; + encrypt_using_particular_box(box, input.get_input_block_strings()); } } } diff --git a/utils/encrypt_bmp.cpp b/utils/encrypt_bmp.cpp index 086e14d..67ec412 100644 --- a/utils/encrypt_bmp.cpp +++ b/utils/encrypt_bmp.cpp @@ -98,18 +98,14 @@ namespace { aes::Box::Block iv; aes::Box::parse_block(iv, algorithm, settings.get_iv_string()); + aes::Box box{ algorithm, key, mode, iv }; - encrypt_bmp( - aes::Box(algorithm, key, mode, iv), - plaintext_path, - ciphertext_path); + encrypt_bmp(box, plaintext_path, ciphertext_path); } else { - encrypt_bmp( - aes::Box(algorithm, key), - plaintext_path, - ciphertext_path); + aes::Box box{ algorithm, key }; + encrypt_bmp(box, plaintext_path, ciphertext_path); } } } diff --git a/utils/encrypt_file.cpp b/utils/encrypt_file.cpp index 9a3dda8..4161e92 100644 --- a/utils/encrypt_file.cpp +++ b/utils/encrypt_file.cpp @@ -83,18 +83,14 @@ namespace { aes::Box::Block iv; aes::Box::parse_block(iv, algorithm, settings.get_iv_string()); + aes::Box box{ algorithm, key, mode, iv }; - encrypt_file( - aes::Box(algorithm, key, mode, iv), - plaintext_path, - ciphertext_path); + encrypt_file(box, plaintext_path, ciphertext_path); } else { - encrypt_file( - aes::Box(algorithm, key), - plaintext_path, - ciphertext_path); + aes::Box box{ algorithm, key }; + encrypt_file(box, plaintext_path, ciphertext_path); } } } -- cgit v1.2.3