diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-13 15:42:15 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-13 15:42:15 +0200 |
| commit | 80452ac0abc6494000a9bbad8d7dccfd72ea85f2 (patch) | |
| tree | 2d46252837083d1d2cfe0aa25d63aa23dfe80714 /aesxx/utils/decrypt_block.cpp | |
| parent | workflows/ci: add clang-format job (diff) | |
| download | aes-tools-80452ac0abc6494000a9bbad8d7dccfd72ea85f2.tar.gz aes-tools-80452ac0abc6494000a9bbad8d7dccfd72ea85f2.zip | |
aesxx: upgrade to std::string_view, std::format & <filesystem>
Diffstat (limited to '')
| -rw-r--r-- | aesxx/utils/decrypt_block.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/aesxx/utils/decrypt_block.cpp b/aesxx/utils/decrypt_block.cpp index 42e496e..d432e31 100644 --- a/aesxx/utils/decrypt_block.cpp +++ b/aesxx/utils/decrypt_block.cpp @@ -12,6 +12,7 @@ #include <boost/program_options.hpp> #include <exception> +#include <format> #include <iostream> #include <stdexcept> #include <string> @@ -48,7 +49,7 @@ void decrypt_with_mode(const Input& input, bool verbose = false) { dump_plaintext<algorithm>(plaintext); dump_next_iv<algorithm, mode>(decrypt); } else { - std::cout << aes::to_string<algorithm>(plaintext) << '\n'; + std::cout << std::format("{}\n", aes::to_string<algorithm>(plaintext)); } } } @@ -112,7 +113,7 @@ void decrypt_using_particular_box(aes::Box& box, const std::vector<std::string>& aes::Box::Block plaintext; box.decrypt_block(ciphertext, plaintext); - std::cout << box.format_block(plaintext) << '\n'; + std::cout << std::format("{}\n", box.format_block(plaintext)); } } @@ -161,7 +162,7 @@ int main(int argc, char** argv) { std::cerr << e; return 1; } catch (const std::exception& e) { - std::cerr << e.what() << "\n"; + std::cerr << std::format("{}\n", e.what()); return 1; } return 0; |
