aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-26 12:23:26 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:57 +0200
commit32ed4100e098ae2930e6fd94800c6ce7041101c2 (patch)
tree5cd408f732d1b40ec1651dbcae35ffa0f4501206 /NK_C_API.h
parent39b7c99bbd00c0bc4906939ceefb724a3d9ddc35 (diff)
downloadlibnitrokey-32ed4100e098ae2930e6fd94800c6ce7041101c2.tar.gz
libnitrokey-32ed4100e098ae2930e6fd94800c6ce7041101c2.tar.bz2
Working PW safe getting slot name
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NK_C_API.h')
-rw-r--r--NK_C_API.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/NK_C_API.h b/NK_C_API.h
index dbbacae..9d6bc94 100644
--- a/NK_C_API.h
+++ b/NK_C_API.h
@@ -13,6 +13,9 @@ extern void NK_set_debug(bool state);
extern int NK_login(const char *admin_pin, const char *temporary_password);
extern int NK_logout();
extern const char * NK_status();
+extern uint8_t NK_get_last_command_status();
+extern int NK_lock_device();
+//otp
extern const char * NK_get_totp_slot_name(uint8_t slot_number);
extern const char * NK_get_hotp_slot_name(uint8_t slot_number);
extern int NK_erase_slot(uint8_t slot_number);
@@ -22,14 +25,18 @@ extern uint32_t NK_get_hotp_code(uint8_t slot_number);
extern uint32_t NK_get_totp_code(uint8_t slot_number, uint64_t challenge, uint64_t last_totp_time, uint8_t last_interval);
extern int NK_totp_set_time(uint64_t time);
extern int NK_totp_get_time();
-extern uint8_t NK_get_last_command_status();
+//passwords
extern int NK_change_admin_PIN(char *current_PIN, char *new_PIN);
extern int NK_change_user_PIN(char *current_PIN, char *new_PIN);
extern uint8_t NK_get_user_retry_count();
extern uint8_t NK_get_admin_retry_count();
+//password safe
extern int NK_enable_password_safe(const char *user_pin);
extern int NK_get_password_safe_slot_status();
-extern int NK_lock_device();
+extern const char *NK_get_password_safe_slot_name(uint8_t slot_number, const char *temporary_password);
+extern const char *NK_get_password_safe_slot_login(uint8_t slot_number);
+extern const char *NK_get_password_safe_slot_password(uint8_t slot_number);
+extern int NK_write_password_safe_slot();
}