aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-06-19 19:56:45 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2018-06-19 19:56:45 +0200
commite1ef8d79809190c5ac5d540bd4aa376dcfda7e93 (patch)
tree37e00db5876dc1965f0b59a5c6b007fd51f5b603 /NK_C_API.h
parentb46dbfa63f344cd7e5323139cf71cd100a179682 (diff)
parent9a4e5a3e0161ea2d0d72d371439ee44b8b137489 (diff)
downloadlibnitrokey-e1ef8d79809190c5ac5d540bd4aa376dcfda7e93.tar.gz
libnitrokey-e1ef8d79809190c5ac5d540bd4aa376dcfda7e93.tar.bz2
Merge branch 'pr_114'
Cleanup API related to device's TOTP time management Fixes #114
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}
+ * &gt; {@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