pub enum HashAlgorithm {
None,
MD5,
SHA1,
SHA224,
SHA256,
SHA384,
SHA512,
Unknown(u8),
}Expand description
Hash algorithms used in DTLS (RFC 5246, RFC 8446).
Specifies the hash algorithm to be used in digital signatures, PRF/HKDF operations, and transcript hashing.
Variants§
None
No hash (not typically used).
MD5
MD5 hash (deprecated, not supported).
SHA1
SHA-1 hash (deprecated, not supported).
SHA224
SHA-224 hash.
SHA256
SHA-256 hash (supported by dimpl).
SHA384
SHA-384 hash (supported by dimpl).
SHA512
SHA-512 hash.
Unknown(u8)
Unknown or unsupported hash algorithm.
Implementations§
Source§impl HashAlgorithm
impl HashAlgorithm
Sourcepub fn parse(input: &[u8]) -> IResult<&[u8], HashAlgorithm>
pub fn parse(input: &[u8]) -> IResult<&[u8], HashAlgorithm>
Parse a HashAlgorithm from wire format.
Sourcepub fn output_len(&self) -> usize
pub fn output_len(&self) -> usize
Returns the output length in bytes for this hash algorithm.
Trait Implementations§
Source§impl Clone for HashAlgorithm
impl Clone for HashAlgorithm
Source§fn clone(&self) -> HashAlgorithm
fn clone(&self) -> HashAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HashAlgorithm
impl Debug for HashAlgorithm
Source§impl Default for HashAlgorithm
impl Default for HashAlgorithm
Source§impl PartialEq for HashAlgorithm
impl PartialEq for HashAlgorithm
impl Copy for HashAlgorithm
impl Eq 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