pub struct HOTP { /* private fields */ }Implementations§
Source§impl HOTP
impl HOTP
pub fn new(secret: &str) -> HOTP
pub fn from_base32(secret: &str) -> Result<HOTP>
pub fn from_bytes(secret: &[u8]) -> HOTP
pub fn generate(&self, counter: u64) -> Result<u32>
pub fn verify(&self, code: u32, last: u64, trials: u64) -> bool
pub fn base32_secret(&self) -> String
pub fn to_uri(&self, label: &str, issuer: &str, counter: u64) -> String
Trait Implementations§
impl Eq for HOTP
impl StructuralPartialEq for HOTP
Auto Trait Implementations§
impl Freeze for HOTP
impl RefUnwindSafe for HOTP
impl Send for HOTP
impl Sync for HOTP
impl Unpin for HOTP
impl UnwindSafe for HOTP
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more