pub enum DigestAlg {
Sha1,
Sha256,
Gost,
Sha384,
Int(u8),
}
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.
Variants§
Sha1
Specifies that the SHA-1 hash function is used.
Implementation of this function is currently mandatory.
Sha256
Specifies that the SHA-256 hash function is used.
Implementation of this function is currently mandatory.
Gost
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.
Sha384
Specifies that the SHA-384 hash function is used.
Use of this hash function is described in RFC 6605. Implementing the function is optional.
Int(u8)
A raw value given through its integer.
Implementations§
source§impl DigestAlg
impl DigestAlg
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.
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs> ) -> Result<Self, ParseError>
pub const COMPOSE_LEN: u16 = 1u16
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target ) -> Result<(), Target::AppendError>
Trait Implementations§
source§impl Ord for DigestAlg
impl Ord for DigestAlg
source§impl PartialEq<DigestAlg> for DigestAlg
impl PartialEq<DigestAlg> for DigestAlg
source§impl PartialEq<DigestAlg> for u8
impl PartialEq<DigestAlg> for u8
source§impl PartialOrd<DigestAlg> for DigestAlg
impl PartialOrd<DigestAlg> for DigestAlg
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<DigestAlg> for u8
impl PartialOrd<DigestAlg> for u8
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<u8> for DigestAlg
impl PartialOrd<u8> for DigestAlg
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more