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 PartialOrd<DigestAlg> for u8
impl PartialOrd<DigestAlg> for u8
source§impl PartialOrd<u8> for DigestAlg
impl PartialOrd<u8> for DigestAlg
source§impl PartialOrd for DigestAlg
impl PartialOrd for DigestAlg
impl Copy for DigestAlg
impl Eq for DigestAlg
Auto Trait Implementations§
impl Freeze for DigestAlg
impl RefUnwindSafe for DigestAlg
impl Send for DigestAlg
impl Sync for DigestAlg
impl Unpin for DigestAlg
impl UnwindSafe for DigestAlg
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)