From 1634bddb91323753546e6fe475d70d41dd79faee Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 13 May 2017 14:20:40 +0200 Subject: Log temporary password as hexdump instead of string representation Signed-off-by: Szczepan Zalega --- include/stick10_commands.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/stick10_commands.h') diff --git a/include/stick10_commands.h b/include/stick10_commands.h index b38ea06..e863328 100644 --- a/include/stick10_commands.h +++ b/include/stick10_commands.h @@ -683,7 +683,7 @@ class FirstAuthenticate : Command { std::string dissect() const { std::stringstream ss; print_to_ss_volatile(card_password); - ss << "temporary_password:\t" << temporary_password << std::endl; + hexdump_to_ss(temporary_password); return ss.str(); } } __packed; @@ -702,7 +702,7 @@ class UserAuthenticate : Command { std::string dissect() const { std::stringstream ss; print_to_ss_volatile(card_password); - ss << "temporary_password:\t" << temporary_password << std::endl; + hexdump_to_ss(temporary_password); return ss.str(); } } __packed; @@ -720,7 +720,7 @@ class Authorize : Command { std::string dissect() const { std::stringstream ss; ss << " crc_to_authorize:\t" << std::hex << std::setw(2) << std::setfill('0') << crc_to_authorize<< std::endl; - ss << " temporary_password:\t" << temporary_password<< std::endl; + hexdump_to_ss(temporary_password); return ss.str(); } } __packed; @@ -737,7 +737,7 @@ class UserAuthorize : Command { std::string dissect() const { std::stringstream ss; ss << " crc_to_authorize:\t" << crc_to_authorize<< std::endl; - ss << " temporary_password:\t" << temporary_password<< std::endl; + hexdump_to_ss(temporary_password); return ss.str(); } } __packed; -- cgit v1.2.1