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
sourceimpl 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.
Trait Implementations
sourceimpl Compose for SecAlg
impl Compose for SecAlg
sourcefn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the concrete representation of the value to the target. Read more
sourcefn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the canonical representation of the value to the target. Read more
sourceimpl<'de> Deserialize<'de> for SecAlg
impl<'de> Deserialize<'de> for SecAlg
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for SecAlg
impl Ord for SecAlg
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<SecAlg> for SecAlg
impl PartialEq<SecAlg> for SecAlg
sourceimpl PartialEq<SecAlg> for u8
impl PartialEq<SecAlg> for u8
sourceimpl PartialEq<u8> for SecAlg
impl PartialEq<u8> for SecAlg
sourceimpl PartialOrd<SecAlg> for SecAlg
impl PartialOrd<SecAlg> for SecAlg
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<SecAlg> for u8
impl PartialOrd<SecAlg> for u8
sourcefn partial_cmp(&self, other: &SecAlg) -> Option<Ordering>
fn partial_cmp(&self, other: &SecAlg) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<u8> for SecAlg
impl PartialOrd<u8> for SecAlg
sourcefn partial_cmp(&self, other: &u8) -> Option<Ordering>
fn partial_cmp(&self, other: &u8) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for SecAlg
impl Eq for SecAlg
Auto Trait Implementations
impl RefUnwindSafe for SecAlg
impl Send for SecAlg
impl Sync for SecAlg
impl Unpin for SecAlg
impl UnwindSafe for SecAlg
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.