diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/NitrokeyManager.h | 4 | ||||
-rw-r--r-- | include/stick10_commands.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h index d4e19e7..a3399fa 100644 --- a/include/NitrokeyManager.h +++ b/include/NitrokeyManager.h @@ -37,6 +37,9 @@ namespace nitrokey { const char * get_totp_slot_name(uint8_t slot_number); const char * get_hotp_slot_name(uint8_t slot_number); + void change_user_PIN(char *current_PIN, char *new_PIN); + void change_admin_PIN(char *current_PIN, char *new_PIN); + private: NitrokeyManager(); ~NitrokeyManager(); @@ -51,6 +54,7 @@ namespace nitrokey { uint8_t get_internal_slot_number_for_totp(uint8_t slot_number) const; bool erase_slot(uint8_t slot_number); uint8_t *get_slot_name(uint8_t slot_number) const; + }; } diff --git a/include/stick10_commands.h b/include/stick10_commands.h index ca836db..d923d93 100644 --- a/include/stick10_commands.h +++ b/include/stick10_commands.h @@ -611,6 +611,12 @@ class ChangeUserPin : Command<CommandID::CHANGE_USER_PIN> { struct CommandPayload { uint8_t old_pin[25]; uint8_t new_pin[25]; + std::string dissect() const { + std::stringstream ss; + ss << " old_pin:\t" << old_pin<< std::endl; + ss << " new_pin:\t" << new_pin<< std::endl; + return ss.str(); + } } __packed; typedef Transaction<command_id(), struct CommandPayload, struct EmptyPayload> @@ -633,6 +639,12 @@ class ChangeAdminPin : Command<CommandID::CHANGE_ADMIN_PIN> { struct CommandPayload { uint8_t old_pin[25]; uint8_t new_pin[25]; + std::string dissect() const { + std::stringstream ss; + ss << " old_pin:\t" << old_pin<< std::endl; + ss << " new_pin:\t" << new_pin<< std::endl; + return ss.str(); + } } __packed; typedef Transaction<command_id(), struct CommandPayload, struct EmptyPayload> |