From 2ca5deb106ede1ffd236f153abae8fe6e3b0401c Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 19 Jun 2019 12:06:00 +0200 Subject: Add function reading HOTP slot details Signed-off-by: Szczepan Zalega --- NK_C_API.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'NK_C_API.h') diff --git a/NK_C_API.h b/NK_C_API.h index 9383cd9..d5c54a3 100644 --- a/NK_C_API.h +++ b/NK_C_API.h @@ -995,6 +995,18 @@ extern "C" { */ NK_C_API int NK_change_firmware_password_pro(const char *current_firmware_password, const char *new_firmware_password); + +// as in ReadSlot::ResponsePayload +struct ReadSlot_t { + uint8_t slot_name[15]; + uint8_t _slot_config; + uint8_t slot_token_id[13]; + uint64_t slot_counter; +}; + + +NK_C_API int NK_read_HOTP_slot(const uint8_t slot_num, struct ReadSlot_t* out); + #ifdef __cplusplus } #endif -- cgit v1.2.1