[−][src]Struct otplib::Authenticator
Methods
impl Authenticator
[src]
pub fn new<T: Into<Vec<u8>>, L: Into<u8>>(secret: T, digits: L) -> Authenticator
[src]
pub fn from_base32<T: Into<String>, L: Into<u8>>(
encoded_secret: T,
digits: L
) -> Result<Authenticator, Error>
[src]
encoded_secret: T,
digits: L
) -> Result<Authenticator, Error>
pub fn from_token_url<T: Into<String>>(token: T) -> Result<Authenticator, Error>
[src]
pub fn generate_totp(&self) -> u32
[src]
pub fn generate_hotp(&self, counter: u64) -> u32
[src]
Trait Implementations
impl Clone for Authenticator
[src]
fn clone(&self) -> Authenticator
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Authenticator
[src]
Auto Trait Implementations
impl RefUnwindSafe for Authenticator
impl Send for Authenticator
impl Sync for Authenticator
impl Unpin for Authenticator
impl UnwindSafe for Authenticator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,