From 33344655d519b351d17d4f166dba406d1ab79e8e Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 27 Jul 2016 06:16:00 +0200 Subject: Handle misc functions: factory reset, build aes key, unlock user password (not yet tested) Signed-off-by: Szczepan Zalega --- NK_C_API.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'NK_C_API.cc') diff --git a/NK_C_API.cc b/NK_C_API.cc index db96c52..6565b7c 100644 --- a/NK_C_API.cc +++ b/NK_C_API.cc @@ -86,6 +86,27 @@ extern int NK_user_authenticate(const char* user_password, const char* user_temp }); } +extern int NK_factory_reset(const char* admin_password){ + auto m = NitrokeyManager::instance(); + return get_without_result( [&](){ + return m->factory_reset(admin_password); + }); +} +extern int NK_build_aes_key(const char* admin_password){ + auto m = NitrokeyManager::instance(); + return get_without_result( [&](){ + return m->build_aes_key(admin_password); + }); +} + +extern int NK_unlock_user_password(const char* admin_password){ + auto m = NitrokeyManager::instance(); + return get_without_result( [&](){ + return m->unlock_user_password(admin_password); + }); +} + + extern const char * NK_status() { auto m = NitrokeyManager::instance(); try { -- cgit v1.2.1