aboutsummaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index d453f7b..7ffee51 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -263,4 +263,18 @@ namespace nitrokey{
return strdup((const char *) response.slot_password);
}
+ void NitrokeyManager::write_password_safe_slot(uint8_t slot_number, const char *slot_name, const char *slot_login,
+ const char *slot_password) {
+ auto p = get_payload<SetPasswordSafeSlotData>();
+ p.slot_number = slot_number;
+ strcpyT(p.slot_name, slot_name);
+ strcpyT(p.slot_password, slot_password);
+ SetPasswordSafeSlotData::CommandTransaction::run(*device, p);
+
+ auto p2 = get_payload<SetPasswordSafeSlotData2>();
+ p2.slot_number = slot_number;
+ strcpyT(p2.slot_login_name, slot_login);
+ SetPasswordSafeSlotData2::CommandTransaction::run(*device, p2);
+ }
+
} \ No newline at end of file