Nitrokey / libnitrokey

Communicate with Nitrokey devices in a clean and easy manner
https://nitrokey.com/
GNU Lesser General Public License v3.0
65 stars 34 forks source link

Add NK_read_TOTP_slot to C API #160

Open robinkrahl opened 5 years ago

robinkrahl commented 5 years ago

In the 3.5 release, the NK_read_HOTP_slot function was added to the C API. Yet as far as I see, the corresponding TOTP function is not supported. Shouldn’t both slot types be readable via the C API?

szszszsz commented 5 years ago

Hi! Indeed there is no TOTP complementary added. I did not thought back then anyone would find it useful, but surely I can add it, if there is a need. For TOTP slot it can read the period value AFAIR. In HOTP case - the current slot's counter value (which I needed for Nitrokey Storage v0.54 automatic tests).

robinkrahl commented 3 years ago

This is a blocker for d-e-s-o/nitrocli#159 (updating a TOTP slot without overwriting the time window).