Struct kanidmd_lib::credential::totp::Totp
source · [−]pub struct Totp { /* private fields */ }
Expand description
Implementations
sourceimpl Totp
impl Totp
pub fn new(secret: Vec<u8>, step: u64, algo: TotpAlgo) -> Self
pub fn generate_secure(step: u64) -> Self
pub fn do_totp_duration_from_epoch(
&self,
time: &Duration
) -> Result<u32, TotpError>
pub fn do_totp(&self, time: &SystemTime) -> Result<u32, TotpError>
pub fn verify(&self, chal: u32, time: &Duration) -> bool
pub fn to_proto(&self, accountname: &str, issuer: &str) -> ProtoTotp
pub fn is_legacy_algo(&self) -> bool
pub fn downgrade_to_legacy(self) -> Self
Trait Implementations
sourceimpl From<TotpSecret> for Totp
impl From<TotpSecret> for Totp
impl Eq for Totp
impl StructuralEq for Totp
impl StructuralPartialEq for Totp
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more