summaryrefslogtreecommitdiff
path: root/NK_C_API.cc
diff options
context:
space:
mode:
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r--NK_C_API.cc22
1 files changed, 18 insertions, 4 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc
index 8ce318f..f881caf 100644
--- a/NK_C_API.cc
+++ b/NK_C_API.cc
@@ -495,17 +495,31 @@ extern "C" {
});
}
- NK_C_API int NK_set_unencrypted_read_only(const char* user_admin_pin) {
+ NK_C_API int NK_set_unencrypted_read_only(const char *user_pin) {
auto m = NitrokeyManager::instance();
return get_without_result([&]() {
- m->set_unencrypted_read_only(user_admin_pin);
+ m->set_unencrypted_read_only(user_pin);
});
}
- NK_C_API int NK_set_unencrypted_read_write(const char* user_admin_pin) {
+ NK_C_API int NK_set_unencrypted_read_write(const char *user_pin) {
auto m = NitrokeyManager::instance();
return get_without_result([&]() {
- m->set_unencrypted_read_write(user_admin_pin);
+ m->set_unencrypted_read_write(user_pin);
+ });
+ }
+
+ NK_C_API int NK_set_unencrypted_read_only_admin(const char *admin_pin) {
+ auto m = NitrokeyManager::instance();
+ return get_without_result([&]() {
+ m->set_unencrypted_read_only_admin(admin_pin);
+ });
+ }
+
+ NK_C_API int NK_set_unencrypted_read_write_admin(const char *admin_pin) {
+ auto m = NitrokeyManager::instance();
+ return get_without_result([&]() {
+ m->set_unencrypted_read_write_admin(admin_pin);
});
}