summaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-27 06:16:00 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:57 +0200
commit33344655d519b351d17d4f166dba406d1ab79e8e (patch)
tree54b4d3e303a502bc45947f5d90173efdc2176f1a /NitrokeyManager.cc
parentf5b5339a0cd272b3be33013f01e14f5bcc6e5aa8 (diff)
downloadlibnitrokey-33344655d519b351d17d4f166dba406d1ab79e8e.tar.gz
libnitrokey-33344655d519b351d17d4f166dba406d1ab79e8e.tar.bz2
Handle misc functions: factory reset, build aes key, unlock user password (not yet tested)
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc18
1 files changed, 18 insertions, 0 deletions
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<BuildAESKey>();
+ strcpyT(p.admin_password, admin_password);
+ BuildAESKey::CommandTransaction::run(*device, p);
+ }
+
+ void NitrokeyManager::factory_reset(const char *admin_password) {
+ auto p = get_payload<FactoryReset>();
+ strcpyT(p.admin_password, admin_password);
+ FactoryReset::CommandTransaction::run(*device, p);
+ }
+
+ void NitrokeyManager::unlock_user_password(const char *admin_password) {
+ auto p = get_payload<UnlockUserPassword>();
+ strcpyT(p.admin_password, admin_password);
+ UnlockUserPassword::CommandTransaction::run(*device, p);
+ }
+
} \ No newline at end of file