diff --git a/src/lib.rs b/src/lib.rs index 871d188..3d3414a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,6 @@ //! //! Bindings closely resemble the reverse-engineered [python library](https://github.com/Yubico/yubikey-manager/blob/main/yubikit/oath.py), //! as well as the discontinued crate [ykoath](https://crates.io/crates/ykoath) -//! /// constants relevant for apdu, pcsc, error handling pub mod constants; @@ -16,16 +15,15 @@ pub mod oath_credential_id; mod refreshable_oath_credential; mod transaction; +use std::time::{Duration, SystemTime}; + use constants::*; +use hmac::{Hmac, Mac}; use oath_credential::*; use oath_credential_id::*; use refreshable_oath_credential::*; use transaction::*; -use std::time::{Duration, SystemTime}; - -use hmac::{Hmac, Mac}; - fn hmac_sha1(key: &[u8], message: &[u8]) -> Vec { let mut mac = Hmac::::new_from_slice(key).expect("Invalid key length"); mac.update(message); diff --git a/src/refreshable_oath_credential.rs b/src/refreshable_oath_credential.rs index 0c6ed57..7f6dbe1 100644 --- a/src/refreshable_oath_credential.rs +++ b/src/refreshable_oath_credential.rs @@ -1,11 +1,11 @@ -use crate::{OathCodeDisplay, OathCredential, OathSession, OathType}; - use std::{ fmt::Display, ops::Range, time::{Duration, SystemTime}, }; +use crate::{OathCodeDisplay, OathCredential, OathSession, OathType}; + pub struct RefreshableOathCredential<'a> { pub cred: OathCredential, pub code: Option,