diff options
Diffstat (limited to 'aesxx/utils/encrypt_file.cpp')
| -rw-r--r-- | aesxx/utils/encrypt_file.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/aesxx/utils/encrypt_file.cpp b/aesxx/utils/encrypt_file.cpp index e069ec7..9f08378 100644 --- a/aesxx/utils/encrypt_file.cpp +++ b/aesxx/utils/encrypt_file.cpp @@ -29,21 +29,21 @@ void encrypt_file( } void encrypt_file(const FileSettings& settings) { - const auto& algorithm = settings.algorithm; - const auto& mode = settings.mode; + const auto algorithm = settings.get_algorithm(); + const auto mode = settings.get_mode(); aes::Box::Key key; - aes::Box::parse_key(key, algorithm, settings.key); + aes::Box::parse_key(key, algorithm, settings.get_key()); if (aes::mode_requires_init_vector(mode)) { aes::Box::Block iv; - aes::Box::parse_block(iv, algorithm, settings.iv); + aes::Box::parse_block(iv, algorithm, settings.get_iv()); aes::Box box{algorithm, key, mode, iv}; - encrypt_file(box, settings.input_path, settings.output_path); + encrypt_file(box, settings.get_input_path(), settings.get_output_path()); } else { aes::Box box{algorithm, key}; - encrypt_file(box, settings.input_path, settings.output_path); + encrypt_file(box, settings.get_input_path(), settings.get_output_path()); } } @@ -60,7 +60,7 @@ int main(int argc, char** argv) { return 1; } - if (settings.exit_with_usage) { + if (settings.exit_with_usage()) { settings.usage(); return 0; } |
