diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-01-24 17:33:49 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-11 15:41:39 +0100 |
commit | 2543e09fa25fa8ed54920c519de32d4b4da074d4 (patch) | |
tree | c328c02c529fb8e6d275284c2edd1327fcc9856f /include/NitrokeyManager.h | |
parent | 02ac032b7493749bfd64533fe0c7f1e8ff46fe75 (diff) | |
download | libnitrokey-2543e09fa25fa8ed54920c519de32d4b4da074d4.tar.gz libnitrokey-2543e09fa25fa8ed54920c519de32d4b4da074d4.tar.bz2 |
Read slot command support
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/NitrokeyManager.h')
-rw-r--r-- | include/NitrokeyManager.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h index c7d7704..03f1a86 100644 --- a/include/NitrokeyManager.h +++ b/include/NitrokeyManager.h @@ -32,6 +32,10 @@ namespace nitrokey { uint32_t get_HOTP_code(uint8_t slot_number, const char *user_temporary_password); uint32_t get_TOTP_code(uint8_t slot_number, uint64_t challenge, uint64_t last_totp_time, uint8_t last_interval, const char *user_temporary_password); + uint32_t get_TOTP_code(uint8_t slot_number, const char *user_temporary_password); + stick10::ReadSlot::ResponsePayload get_TOTP_slot_data(const uint8_t slot_number); + stick10::ReadSlot::ResponsePayload get_HOTP_slot_data(const uint8_t slot_number); + bool set_time(uint64_t time); bool get_time(); bool erase_totp_slot(uint8_t slot_number, const char *temporary_password); @@ -127,7 +131,8 @@ namespace nitrokey { static shared_ptr <NitrokeyManager> _instance; std::shared_ptr<Device> device; - bool is_valid_hotp_slot_number(uint8_t slot_number) const; + stick10::ReadSlot::ResponsePayload get_OTP_slot_data(const uint8_t slot_number); + bool is_valid_hotp_slot_number(uint8_t slot_number) const; bool is_valid_totp_slot_number(uint8_t slot_number) const; bool is_valid_password_safe_slot_number(uint8_t slot_number) const; uint8_t get_internal_slot_number_for_hotp(uint8_t slot_number) const; |