From f7145d6e1f077297f9b513431309575a3c60275f Mon Sep 17 00:00:00 2001 From: luna <44528100+pozm@users.noreply.github.com> Date: Thu, 15 Sep 2022 01:07:17 +0100 Subject: [PATCH] pad single digit hex character --- library.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library.cpp b/library.cpp index b34957a..bd54118 100644 --- a/library.cpp +++ b/library.cpp @@ -1,3 +1,4 @@ +#include #include "library.h" #include "ModuleWrapper.h" // signature offset @@ -41,7 +42,7 @@ void main_thread() { std::cout << "Secret key: "; for (auto i : secretKey) { - std::cout << std::hex << (int)i; + std::cout << std::setw(2) << std::setfill('0') << std::hex << (int)i; } std::cout << std::endl; }