aboutsummaryrefslogtreecommitdiff
path: root/include/stick10_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-05-13 14:20:40 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-05-13 14:20:40 +0200
commit1634bddb91323753546e6fe475d70d41dd79faee (patch)
treefc6c5cc9cd1f99674f433fe99124ecc362bbcc12 /include/stick10_commands.h
parentb307e84b5d67419a9fbec6e222ff51d2f917d928 (diff)
downloadlibnitrokey-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.h8
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;