#[repr(u64)]pub enum HashAlgorithm {
Sha1 = 1,
Sha256 = 2,
Sha512 = 64,
}Expand description
A hash algorithm selected at run time, as named in DKIM tags (the hash
part of a=, and the h= tag of DKIM key records) and in the h= tag
of DKIM2 Message-Instance header fields.
Variants§
Sha1 = 1
SHA-1 (sha1).
Sha256 = 2
SHA-256 (sha256).
Sha512 = 64
SHA-512 (sha512). Used by DKIM2 only.
Implementations§
Source§impl HashAlgorithm
impl HashAlgorithm
Sourcepub fn hash(&self, data: impl Writable) -> HashOutput
pub fn hash(&self, data: impl Writable) -> HashOutput
Hashes the bytes written by data with this algorithm.
Trait Implementations§
Source§impl Clone for HashAlgorithm
impl Clone for HashAlgorithm
impl Copy for HashAlgorithm
Source§impl Debug for HashAlgorithm
impl Debug for HashAlgorithm
impl Eq for HashAlgorithm
Source§impl From<Algorithm> for HashAlgorithm
impl From<Algorithm> for HashAlgorithm
Source§impl From<HashAlgorithm> for u64
impl From<HashAlgorithm> for u64
Source§fn from(v: HashAlgorithm) -> Self
fn from(v: HashAlgorithm) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HashAlgorithm
impl PartialEq for HashAlgorithm
impl StructuralPartialEq for HashAlgorithm
Auto Trait Implementations§
impl Freeze for HashAlgorithm
impl RefUnwindSafe for HashAlgorithm
impl Send for HashAlgorithm
impl Sync for HashAlgorithm
impl Unpin for HashAlgorithm
impl UnsafeUnpin for HashAlgorithm
impl UnwindSafe for HashAlgorithm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more