pub struct OtpEngine { /* private fields */ }Implementations§
Source§impl OtpEngine
impl OtpEngine
pub fn from_public_key(pk: &PublicKey) -> Result<Self>
pub fn from_seed(seed: OtpSeed) -> Self
pub fn seed(&self) -> &OtpSeed
pub fn generate( &self, len: usize, time_step: u64, step_secs: u64, charset: Charset, ) -> Result<OtpCode>
pub fn generate_default(&self, len: usize, time_step: u64) -> Result<OtpCode>
pub fn generate_now(&self, len: usize) -> Result<OtpCode>
pub fn verify( &self, code: &OtpCode, time_step: u64, ttl: u64, step_secs: u64, charset: Charset, ) -> Result<()>
pub fn verify_default( &self, code: &OtpCode, time_step: u64, ttl: u64, ) -> Result<()>
pub fn verify_raw( &self, raw: &str, len: usize, time_step: u64, ttl: u64, step_secs: u64, charset: Charset, ) -> Result<()>
pub fn verify_with_skew( &self, raw: &str, len: usize, time_step: u64, ttl: u64, step_secs: u64, charset: Charset, skew_steps: u64, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OtpEngine
impl RefUnwindSafe for OtpEngine
impl Send for OtpEngine
impl Sync for OtpEngine
impl Unpin for OtpEngine
impl UnsafeUnpin for OtpEngine
impl UnwindSafe for OtpEngine
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