diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 19:56:45 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 19:56:45 +0200 |
commit | e1ef8d79809190c5ac5d540bd4aa376dcfda7e93 (patch) | |
tree | 37e00db5876dc1965f0b59a5c6b007fd51f5b603 /NK_C_API.h | |
parent | b46dbfa63f344cd7e5323139cf71cd100a179682 (diff) | |
parent | 9a4e5a3e0161ea2d0d72d371439ee44b8b137489 (diff) | |
download | libnitrokey-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.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |