From b4c40a129f374e8be347346bfca6dd064290586a Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sun, 6 Mar 2016 18:53:04 +0100 Subject: adding another dissect and reformatting old ones --- include/stick10_commands.h | 59 ++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/include/stick10_commands.h b/include/stick10_commands.h index ab1a5bb..8f45f20 100644 --- a/include/stick10_commands.h +++ b/include/stick10_commands.h @@ -196,10 +196,11 @@ class GetPasswordRetryCount : Command { uint8_t password_retry_count; bool isValid() const { return true; } - std::string dissect() const { + std::string dissect() const { std::stringstream ss; - ss << " password_retry_count\t" << password_retry_count<< std::endl; - return ss.str(); } + ss << " password_retry_count\t" << password_retry_count << std::endl; + return ss.str(); + } } __packed; typedef Transaction @@ -213,10 +214,11 @@ class GetUserPasswordRetryCount uint8_t password_retry_count; bool isValid() const { return true; } - std::string dissect() const { + std::string dissect() const { std::stringstream ss; - ss << " password_retry_count\t" << password_retry_count<< std::endl; - return ss.str(); } + ss << " password_retry_count\t" << password_retry_count << std::endl; + return ss.str(); + } } __packed; typedef Transaction @@ -241,20 +243,22 @@ class GetPasswordSafeSlotName : Command { uint8_t slot_number; bool isValid() const { return !(slot_number & 0xF0); } - std::string dissect() const { + std::string dissect() const { std::stringstream ss; ss << "slot_number\t" << slot_number << std::endl; - return ss.str(); } + return ss.str(); + } } __packed; struct ResponsePayload { uint8_t slot_name[PWS_SLOTNAME_LENGTH]; bool isValid() const { return true; } - std::string dissect() const { + std::string dissect() const { std::stringstream ss; - ss << " slot_name\t" << slot_name << std::endl; - return ss.str(); } + ss << " slot_name\t" << slot_name << std::endl; + return ss.str(); + } } __packed; typedef Transaction { uint8_t password[30]; bool isValid() const { return true; } + std::string dissect() const { + std::stringstream ss; + ss << " password\t" << password << std::endl; + return ss.str(); + } } __packed; typedef Transaction -- cgit v1.2.3