aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.h
diff options
context:
space:
mode:
Diffstat (limited to 'NK_C_API.h')
-rw-r--r--NK_C_API.h66
1 files changed, 61 insertions, 5 deletions
diff --git a/NK_C_API.h b/NK_C_API.h
index a4fb088..73022b2 100644
--- a/NK_C_API.h
+++ b/NK_C_API.h
@@ -360,10 +360,16 @@ extern "C" {
/**
* Get device's major firmware version
- * @return 7,8 for Pro and major for Storage
+ * @return major part of the version number (e.g. 0 from 0.48, 0 from 0.7 etc.)
*/
NK_C_API int NK_get_major_firmware_version();
+ /**
+ * Get device's minor firmware version
+ * @return minor part of the version number (e.g. 7 from 0.7, 48 from 0.48 etc.)
+ */
+ NK_C_API int NK_get_minor_firmware_version();
+
/**
@@ -422,21 +428,71 @@ extern "C" {
* Make unencrypted volume read-only.
* Device hides unencrypted volume for a second therefore make sure
* buffers are flushed before running.
+ * Does nothing if firmware version is not matched
+ * Firmware range: Storage v0.50, v0.48 and below
* Storage only
- * @param user_pin 20 characters
+ * @param user_pin 20 characters User PIN
* @return command processing error code
*/
- NK_C_API int NK_set_unencrypted_read_only(const char* user_pin);
+ NK_C_API int NK_set_unencrypted_read_only(const char *user_pin);
/**
* Make unencrypted volume read-write.
* Device hides unencrypted volume for a second therefore make sure
* buffers are flushed before running.
+ * Does nothing if firmware version is not matched
+ * Firmware range: Storage v0.50, v0.48 and below
* Storage only
- * @param user_pin 20 characters
+ * @param user_pin 20 characters User PIN
+ * @return command processing error code
+ */
+ NK_C_API int NK_set_unencrypted_read_write(const char *user_pin);
+
+ /**
+ * Make unencrypted volume read-only.
+ * Device hides unencrypted volume for a second therefore make sure
+ * buffers are flushed before running.
+ * Does nothing if firmware version is not matched
+ * Firmware range: Storage v0.49, v0.51+
+ * Storage only
+ * @param admin_pin 20 characters Admin PIN
+ * @return command processing error code
+ */
+ NK_C_API int NK_set_unencrypted_read_only_admin(const char* admin_pin);
+
+ /**
+ * Make unencrypted volume read-write.
+ * Device hides unencrypted volume for a second therefore make sure
+ * buffers are flushed before running.
+ * Does nothing if firmware version is not matched
+ * Firmware range: Storage v0.49, v0.51+
+ * Storage only
+ * @param admin_pin 20 characters Admin PIN
+ * @return command processing error code
+ */
+ NK_C_API int NK_set_unencrypted_read_write_admin(const char* admin_pin);
+
+ /**
+ * Make encrypted volume read-only.
+ * Device hides encrypted volume for a second therefore make sure
+ * buffers are flushed before running.
+ * Firmware range: v0.49 only, future (see firmware release notes)
+ * Storage only
+ * @param admin_pin 20 characters
+ * @return command processing error code
+ */
+ NK_C_API int NK_set_encrypted_read_only(const char* admin_pin);
+
+ /**
+ * Make encrypted volume read-write.
+ * Device hides encrypted volume for a second therefore make sure
+ * buffers are flushed before running.
+ * Firmware range: v0.49 only, future (see firmware release notes)
+ * Storage only
+ * @param admin_pin 20 characters
* @return command processing error code
*/
- NK_C_API int NK_set_unencrypted_read_write(const char* user_pin);
+ NK_C_API int NK_set_encrypted_read_write(const char* admin_pin);
/**
* Exports device's firmware to unencrypted volume.