aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2019-06-19 14:45:16 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2019-06-19 14:45:16 +0200
commit3fc4193776b4ea29354838df024a72d7c8349ea9 (patch)
tree65f0cf56c96cb4a667e1fdbefdca054314a6bf5a /NK_C_API.h
parent2c749223714c4d7815ca6b2d1888169a864a0fec (diff)
parent12c4198187de476a4e27da16c7b8737e6550973a (diff)
downloadlibnitrokey-3fc4193776b4ea29354838df024a72d7c8349ea9.tar.gz
libnitrokey-3fc4193776b4ea29354838df024a72d7c8349ea9.tar.bz2
Merge branch 'backward_compatibility'
Do the HOTP slot counter conversion from ASCII to binary only for Storage v0.53 and lower. Storage v0.54 returns binary counter.
Diffstat (limited to 'NK_C_API.h')
-rw-r--r--NK_C_API.h12
1 files changed, 12 insertions, 0 deletions
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