pub enum SecAlg {
Show 18 variants
DeleteDs,
RsaMd5,
Dh,
Dsa,
RsaSha1,
DsaNsec3Sha1,
RsaSha1Nsec3Sha1,
RsaSha256,
RsaSha512,
EccGost,
EcdsaP256Sha256,
EcdsaP384Sha384,
Ed25519,
Ed448,
Indirect,
PrivateDns,
PrivateOid,
Int(u8),
}
Expand description
Security Algorithm Numbers.
These numbers are used in various security related record types.
For the currently registered values see the IANA registration.
Variants§
DeleteDs
Delete DS
This algorithm is used in RFC 8087 to signal to the parent that a certain DS record should be deleted. It is not an actual algorithm and can neither be used in zone nor transaction signing.
RsaMd5
RSA/MD5
This algorithm was described in RFC 2537 and since has been deprecated due to weaknesses of the MD5 hash algorithm by RFC 3110 which suggests to use RSA/SHA1 instead.
This algorithm may not be used for zone signing but may be used for transaction security.
Dh
Diffie-Hellman
This algorithm is described in RFC 2539 for storing Diffie-Hellman (DH) keys in DNS resource records. It can not be used for zone signing but only for transaction security.
Dsa
DSA/SHA1
This algorithm is described in RFC 2536. It may be used both for zone signing and transaction security.
RsaSha1
RSA/SHA-1
This algorithm is described in RFC 3110. It may be used both for zone signing and transaction security. It is mandatory for DNSSEC implementations.
DsaNsec3Sha1
DSA-NSEC3-SHA1
This value is an alias for Dsa
for use within NSEC3 records.
RsaSha1Nsec3Sha1
RSASHA1-NSEC3-SHA1
This value is an alias for RsaSha1
for use within NSEC3 records.
RsaSha256
RSA/SHA-256
This algorithm is described in RFC 5702. It may be used for zone signing only.
RsaSha512
RSA/SHA-512
This algorithm is described in RFC 5702. It may be used for zone signing only.
EccGost
GOST R 34.10-2001
This algorithm is described in RFC 5933. It may be used for zone signing only.
EcdsaP256Sha256
ECDSA Curve P-256 with SHA-256
This algorithm is described in RFC 6605. It may be used for zone signing only.
EcdsaP384Sha384
ECDSA Curve P-384 with SHA-384
This algorithm is described in RFC 6605. It may be used for zone signing only.
Ed25519
ED25519
This algorithm is described in RFC 8080.
Ed448
ED448
This algorithm is described in RFC 8080.
Indirect
Reserved for Indirect Keys
This value is reserved by RFC 4034.
PrivateDns
A private algorithm identified by a domain name.
This value is defined in RFC 4034.
PrivateOid
A private algorithm identified by a ISO OID.
This value is defined in RFC 4034.
Int(u8)
A raw value given through its integer.
Implementations§
source§impl SecAlg
impl SecAlg
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 SecAlg
impl Ord for SecAlg
source§impl PartialEq<SecAlg> for SecAlg
impl PartialEq<SecAlg> for SecAlg
source§impl PartialEq<SecAlg> for u8
impl PartialEq<SecAlg> for u8
source§impl PartialOrd<SecAlg> for SecAlg
impl PartialOrd<SecAlg> for SecAlg
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<SecAlg> for u8
impl PartialOrd<SecAlg> 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 SecAlg
impl PartialOrd<u8> for SecAlg
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