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

Expose OTP and PWS properties (slot counts, limits) #197

Open robinkrahl opened 3 years ago

robinkrahl commented 3 years ago

To allow applications to validate user input before sending it to the device (see d-e-s-o/nitrocli#161), it would be nice to be able to access some OTP- and PWS-related properties using libnitrokey:

As far as I know, these values are the same for all supported devices, but are likely to change in the future. Therefore I suggest to not have them as constants but to add functions that return the value for the currently connected device instead.

If you don’t object, I’ll prepare a PR soon.

szszszsz commented 3 years ago

Good idea! Please proceed.