From b37e5990aa409689e5d6162776583616ac03e0ac Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 25 Jul 2016 18:32:59 +0200 Subject: Enabling password safe and password safe status (latter not working yet) Signed-off-by: Szczepan Zalega --- include/stick10_commands.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/stick10_commands.h') diff --git a/include/stick10_commands.h b/include/stick10_commands.h index d923d93..c8eda03 100644 --- a/include/stick10_commands.h +++ b/include/stick10_commands.h @@ -340,12 +340,28 @@ class GetUserPasswordRetryCount CommandTransaction; }; + template + void write_array(T &ss, Q (&arr)[N]){ + ss << std::hex << std::setfill('0') << std::setw(2); + for (int i=0; i { public: struct ResponsePayload { uint8_t password_safe_status[PWS_SLOT_COUNT]; bool isValid() const { return true; } + std::string dissect() const { + std::stringstream ss; + ss << "password_safe_status\t"; + write_array(ss, password_safe_status); + return ss.str(); + } } __packed; typedef Transaction -- cgit v1.2.1