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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/NK_C_API.h b/NK_C_API.h
index 5bcc484..f23bb5d 100644
--- a/NK_C_API.h
+++ b/NK_C_API.h
@@ -386,6 +386,19 @@ extern "C" {
*/
NK_C_API int NK_totp_set_time(uint64_t time);
+ /**
+ * Set the device time used for TOTP to the given time. Contrary to
+ * {@code set_time(uint64_t)}, this command fails if {@code old_time}
+ * > {@code time} or if {@code old_time} is zero (where {@code
+ * old_time} is the current time on the device).
+ *
+ * @param time new device time as Unix timestamp (seconds since
+ * 1970-01-01)
+ * @return command processing error code
+ */
+ NK_C_API int NK_totp_set_time_soft(uint64_t time);
+
+ [[deprecated("NK_totp_get_time is deprecated -- use NK_totp_set_time_soft instead")]]
NK_C_API int NK_totp_get_time();
//passwords