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 --- NitrokeyManager.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'NitrokeyManager.cc') diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 69b2059..2d63c21 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -307,4 +307,22 @@ namespace nitrokey{ UserAuthenticate::CommandTransaction::run(*device, p); } + void NitrokeyManager::build_aes_key(const char *admin_password) { + auto p = get_payload(); + strcpyT(p.admin_password, admin_password); + BuildAESKey::CommandTransaction::run(*device, p); + } + + void NitrokeyManager::factory_reset(const char *admin_password) { + auto p = get_payload(); + strcpyT(p.admin_password, admin_password); + FactoryReset::CommandTransaction::run(*device, p); + } + + void NitrokeyManager::unlock_user_password(const char *admin_password) { + auto p = get_payload(); + strcpyT(p.admin_password, admin_password); + UnlockUserPassword::CommandTransaction::run(*device, p); + } + } \ No newline at end of file -- cgit v1.2.3