pub struct TotpOptions<'a> {
pub key: &'a [u8],
pub digits: u32,
pub step: u64,
pub epoch: u64,
pub timestamp: u64,
}Expand description
Options for generating TOTP codes.
Fields§
§key: &'a [u8]The secret, shared key to use to generate the code.
digits: u32The number of digits that should be in the code.
Defaults to 6.
step: u64The number of seconds in a generation window.
Defaults to 30.
epoch: u64The seconds from the Unix epoch to use as T0.
Defaults to 0.
timestamp: u64The timestamp to generate the TOTP code at.
Defaults to the current system time if std or libc are enabled.
Auto Trait Implementations§
impl<'a> Freeze for TotpOptions<'a>
impl<'a> RefUnwindSafe for TotpOptions<'a>
impl<'a> Send for TotpOptions<'a>
impl<'a> Sync for TotpOptions<'a>
impl<'a> Unpin for TotpOptions<'a>
impl<'a> UnwindSafe for TotpOptions<'a>
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