pub enum Algorithm {
SHA1,
SHA256,
SHA512,
Steam,
}
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.
Steam
Available on crate feature
steam
only.Steam TOTP token algorithm.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Algorithm
impl<'de> Deserialize<'de> for Algorithm
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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