pub enum Algorithm {
SHA1,
SHA256,
SHA512,
}Expand description
Algorithm enum holds the three standards algorithms for TOTP as per the reference implementation
Variants§
SHA1
HMAC-SHA1 is the default algorithm of most TOTP implementations. Some will outright ignore the algorithm parameter to force using SHA1, leading to confusion.
SHA256
HMAC-SHA256. Supported in theory according to yubico. Ignored in practice by most.
SHA512
HMAC-SHA512. Supported in theory according to yubico. Ignored in practice by most.
Trait Implementations§
impl Copy for Algorithm
impl Eq for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnwindSafe for Algorithm
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