Trait domain::validate::DnskeyExt

source ·
pub trait DnskeyExt {
    // Required method
    fn digest<N: ToName>(
        &self,
        name: &N,
        algorithm: DigestAlg
    ) -> Result<Digest, AlgorithmError>;
}
Available on crate feature validate only.
Expand description

Extensions for DNSKEY record type.

Required Methods§

source

fn digest<N: ToName>( &self, name: &N, algorithm: DigestAlg ) -> Result<Digest, AlgorithmError>

Calculates a digest from DNSKEY.

See RFC 4034, Section 5.1.4:

5.1.4.  The Digest Field
  The digest is calculated by concatenating the canonical form of the
  fully qualified owner name of the DNSKEY RR with the DNSKEY RDATA,
  and then applying the digest algorithm.

    digest = digest_algorithm( DNSKEY owner name | DNSKEY RDATA);

     "|" denotes concatenation

    DNSKEY RDATA = Flags | Protocol | Algorithm | Public Key.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Octets> DnskeyExt for Dnskey<Octets>
where Octets: AsRef<[u8]>,