diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-14 13:02:59 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-19 16:34:11 +0200 |
commit | 41b1f55ae303d7308a86ea4c0621122c4efe4ff9 (patch) | |
tree | 3d4a63c1eed83d87afb187891e7d87677f3b0b9f | |
parent | 48786a730bbbdd75719069e81e620eb916e98be0 (diff) | |
download | libnitrokey-41b1f55ae303d7308a86ea4c0621122c4efe4ff9.tar.gz libnitrokey-41b1f55ae303d7308a86ea4c0621122c4efe4ff9.tar.bz2 |
Command unlock user pin
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r-- | include/stick20_commands.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/stick20_commands.h b/include/stick20_commands.h index ee35b9e..03761a5 100644 --- a/include/stick20_commands.h +++ b/include/stick20_commands.h @@ -62,6 +62,26 @@ namespace stick20 { CommandTransaction; }; + + class UnlockUserPassword : Command<CommandID::UNLOCK_USER_PASSWORD> { + public: + struct CommandPayload { + uint8_t kind; + uint8_t user_new_password[20]; + std::string dissect() const { + std::stringstream ss; + ss << " user_new_password:\t" << user_new_password<< std::endl; + return ss.str(); + } + void set_kind(PasswordKind k){ + kind = (uint8_t)k; + } + } __packed; + + typedef Transaction<command_id(), struct CommandPayload, struct EmptyPayload> + CommandTransaction; + }; + class EnableEncryptedPartition : semantics::non_constructible { public: struct CommandPayload { |