pub struct DigestAlgorithm(/* private fields */);
Expand description
Delegation signer digest algorithm numbers.
These numbers are used in the DS resource record to specify how the key digest in the record has been generated.
For the currently registered values see the IANA registration. This type is complete as of the registry update of 2012-04-13.
Implementations§
Source§impl DigestAlgorithm
impl DigestAlgorithm
Sourcepub const SHA1: DigestAlgorithm
pub const SHA1: DigestAlgorithm
Specifies that the SHA-1 hash function is used.
Implementation of this function is currently mandatory.
Sourcepub const SHA256: DigestAlgorithm
pub const SHA256: DigestAlgorithm
Specifies that the SHA-256 hash function is used.
Implementation of this function is currently mandatory.
Sourcepub const GOST: DigestAlgorithm
pub const GOST: DigestAlgorithm
Specifies that the GOST R 34.11-94 hash function is used.
Use of this hash function is described in RFC 5933. Implementing the function is optional.
Sourcepub const SHA384: DigestAlgorithm
pub const SHA384: DigestAlgorithm
Specifies that the SHA-384 hash function is used.
Use of this hash function is described in RFC 6605. Implementing the function is optional.
Source§impl DigestAlgorithm
impl DigestAlgorithm
pub const COMPOSE_LEN: u16 = 1u16
Sourcepub fn from_mnemonic(m: &[u8]) -> Option<Self>
pub fn from_mnemonic(m: &[u8]) -> Option<Self>
Returns a value from a well-defined mnemonic.
Sourcepub const fn to_mnemonic(self) -> Option<&'static [u8]>
pub const fn to_mnemonic(self) -> Option<&'static [u8]>
Returns the mnemonic for this value if there is one.
This will also return a mnemonic if a well-defined variant
is hidden in a Int
variant.
Sourcepub const fn to_mnemonic_str(self) -> Option<&'static str>
pub const fn to_mnemonic_str(self) -> Option<&'static str>
Returns the mnemonic as a &str
for this value if there is one
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Source§impl DigestAlgorithm
impl DigestAlgorithm
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations§
Source§impl Clone for DigestAlgorithm
impl Clone for DigestAlgorithm
Source§fn clone(&self) -> DigestAlgorithm
fn clone(&self) -> DigestAlgorithm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DigestAlgorithm
impl Debug for DigestAlgorithm
Source§impl Display for DigestAlgorithm
impl Display for DigestAlgorithm
Source§impl<'a> From<&'a DigestAlgorithm> for u8
impl<'a> From<&'a DigestAlgorithm> for u8
Source§fn from(value: &'a DigestAlgorithm) -> Self
fn from(value: &'a DigestAlgorithm) -> Self
Source§impl From<DigestAlgorithm> for u8
impl From<DigestAlgorithm> for u8
Source§fn from(value: DigestAlgorithm) -> Self
fn from(value: DigestAlgorithm) -> Self
Source§impl From<u8> for DigestAlgorithm
impl From<u8> for DigestAlgorithm
Source§impl FromStr for DigestAlgorithm
impl FromStr for DigestAlgorithm
Source§impl Hash for DigestAlgorithm
impl Hash for DigestAlgorithm
Source§impl Ord for DigestAlgorithm
impl Ord for DigestAlgorithm
Source§fn cmp(&self, other: &DigestAlgorithm) -> Ordering
fn cmp(&self, other: &DigestAlgorithm) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DigestAlgorithm
impl PartialEq for DigestAlgorithm
Source§impl PartialOrd for DigestAlgorithm
impl PartialOrd for DigestAlgorithm
Source§impl ZonefileFmt for DigestAlgorithm
impl ZonefileFmt for DigestAlgorithm
Source§fn fmt(&self, p: &mut impl Formatter) -> Result
fn fmt(&self, p: &mut impl Formatter) -> Result
fmt::Formatter
Read more