From 80452ac0abc6494000a9bbad8d7dccfd72ea85f2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 13 Jun 2026 15:42:15 +0200 Subject: aesxx: upgrade to std::string_view, std::format & --- aesxx/utils/decrypt_block.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'aesxx/utils/decrypt_block.cpp') 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 #include +#include #include #include #include @@ -48,7 +49,7 @@ void decrypt_with_mode(const Input& input, bool verbose = false) { dump_plaintext(plaintext); dump_next_iv(decrypt); } else { - std::cout << aes::to_string(plaintext) << '\n'; + std::cout << std::format("{}\n", aes::to_string(plaintext)); } } } @@ -112,7 +113,7 @@ void decrypt_using_particular_box(aes::Box& box, const std::vector& 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; -- cgit v1.3