[][src]Struct libauthenticator::TOTP

pub struct TOTP {
    pub algorithm: Algorithm,
    pub digits: u32,
    pub period: u32,
    pub secret: String,
}

Fields

algorithm: Algorithmdigits: u32period: u32secret: String

Trait Implementations

impl<'_> From<&'_ TOTP> for HOTP[src]

impl OTP for TOTP[src]

fn compute(&self, counter: u64) -> Result<String>[src]

Performs the HMAC-based One-time Password Algorithm (HOTP) given an RFC4648 base32 encoded secret, and an integer counter.

Auto Trait Implementations

impl RefUnwindSafe for TOTP

impl Send for TOTP

impl Sync for TOTP

impl Unpin for TOTP

impl UnwindSafe for TOTP

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.