Enum totp_rfc6238::low_level::HashAlgorithm [−][src]
pub enum HashAlgorithm { SHA1, SHA256, SHA512, }
Expand description
Hash functions for HMAC supported in RFC 6238 Section 1.2.
So far, only SHA-1, SHA-256 and SHA-512 are supported.
Example
use totp_rfc6238::HashAlgorithm; let a = HashAlgorithm::SHA256; // This `HashAlgorithm` can be converted from `str` case-insensitively. let b = HashAlgorithm::from("SHA-256"); let c: HashAlgorithm = "sha256".into(); assert_eq!(a, b); assert_eq!(a, c);
Variants
Implementations
impl HashAlgorithm
[src]
impl HashAlgorithm
[src]Trait Implementations
impl Clone for HashAlgorithm
[src]
impl Clone for HashAlgorithm
[src]fn clone(&self) -> HashAlgorithm
[src]
fn clone(&self) -> HashAlgorithm
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for HashAlgorithm
[src]
impl Debug for HashAlgorithm
[src]impl<T: AsRef<str>> From<T> for HashAlgorithm
[src]
impl<T: AsRef<str>> From<T> for HashAlgorithm
[src]impl PartialEq<HashAlgorithm> for HashAlgorithm
[src]
impl PartialEq<HashAlgorithm> for HashAlgorithm
[src]impl Copy for HashAlgorithm
[src]
impl Eq for HashAlgorithm
[src]
impl StructuralEq for HashAlgorithm
[src]
impl StructuralPartialEq for HashAlgorithm
[src]
Auto Trait Implementations
impl RefUnwindSafe for HashAlgorithm
impl Send for HashAlgorithm
impl Sync for HashAlgorithm
impl Unpin for HashAlgorithm
impl UnwindSafe for HashAlgorithm
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more