louib / challenge-response

Perform HMAC-SHA1 and OTP challenges with YubiKey, OnlyKey and NitroKey, in pure Rust.
Other
4 stars 1 forks source link

refactor: create a usb backend trait #57

Closed louib closed 2 months ago

louib commented 2 months ago

This commit creates a Backend trait that encapsulates all the functions that are specific to a backend (rusb or nusb). This has the following advantages:

I'm not able to implement the dynamic backend feature at the moment, since I need to find a way to deal with the requirements for trait objects in Rust. This can definitely happen in a future PR.