diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-05-13 14:20:40 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-05-13 14:20:40 +0200 |
commit | 1634bddb91323753546e6fe475d70d41dd79faee (patch) | |
tree | fc6c5cc9cd1f99674f433fe99124ecc362bbcc12 /include/stick10_commands.h | |
parent | b307e84b5d67419a9fbec6e222ff51d2f917d928 (diff) | |
download | libnitrokey-1634bddb91323753546e6fe475d70d41dd79faee.tar.gz libnitrokey-1634bddb91323753546e6fe475d70d41dd79faee.tar.bz2 |
Log temporary password as hexdump instead of string representation
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick10_commands.h')
-rw-r--r-- | include/stick10_commands.h | 8 |
1 files changed, 4 insertions, 4 deletions
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<CommandID::FIRST_AUTHENTICATE> { 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<CommandID::USER_AUTHENTICATE> { 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<CommandID::AUTHORIZE> { 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<CommandID::USER_AUTHORIZE> { 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; |