pub struct SecurityAlgorithm(/* private fields */);
Expand description
Security Algorithm Numbers.
These numbers are used in various security related record types.
For the currently registered values see the IANA registration.
Implementations§
Source§impl SecurityAlgorithm
impl SecurityAlgorithm
Sourcepub const DELETE: SecurityAlgorithm
pub const DELETE: SecurityAlgorithm
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.
Sourcepub const RSAMD5: SecurityAlgorithm
pub const RSAMD5: SecurityAlgorithm
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.
Sourcepub const DH: SecurityAlgorithm
pub const DH: SecurityAlgorithm
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.
Sourcepub const DSA: SecurityAlgorithm
pub const DSA: SecurityAlgorithm
DSA/SHA1
This algorithm is described in RFC 2536. It may be used both for zone signing and transaction security.
Sourcepub const RSASHA1: SecurityAlgorithm
pub const RSASHA1: SecurityAlgorithm
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.
Sourcepub const DSA_NSEC3_SHA1: SecurityAlgorithm
pub const DSA_NSEC3_SHA1: SecurityAlgorithm
DSA-NSEC3-SHA1
This value is an alias for Dsa
for use within NSEC3 records.
Sourcepub const RSASHA1_NSEC3_SHA1: SecurityAlgorithm
pub const RSASHA1_NSEC3_SHA1: SecurityAlgorithm
RSASHA1-NSEC3-SHA1
This value is an alias for RsaSha1
for use within NSEC3 records.
Sourcepub const RSASHA256: SecurityAlgorithm
pub const RSASHA256: SecurityAlgorithm
RSA/SHA-256
This algorithm is described in RFC 5702. It may be used for zone signing only.
Sourcepub const RSASHA512: SecurityAlgorithm
pub const RSASHA512: SecurityAlgorithm
RSA/SHA-512
This algorithm is described in RFC 5702. It may be used for zone signing only.
Sourcepub const ECC_GOST: SecurityAlgorithm
pub const ECC_GOST: SecurityAlgorithm
GOST R 34.10-2001
This algorithm is described in RFC 5933. It may be used for zone signing only.
Sourcepub const ECDSAP256SHA256: SecurityAlgorithm
pub const ECDSAP256SHA256: SecurityAlgorithm
ECDSA Curve P-256 with SHA-256
This algorithm is described in RFC 6605. It may be used for zone signing only.
Sourcepub const ECDSAP384SHA384: SecurityAlgorithm
pub const ECDSAP384SHA384: SecurityAlgorithm
ECDSA Curve P-384 with SHA-384
This algorithm is described in RFC 6605. It may be used for zone signing only.
Sourcepub const ED25519: SecurityAlgorithm
pub const ED25519: SecurityAlgorithm
ED25519
This algorithm is described in RFC 8080.
Sourcepub const ED448: SecurityAlgorithm
pub const ED448: SecurityAlgorithm
ED448
This algorithm is described in RFC 8080.
Sourcepub const INDIRECT: SecurityAlgorithm
pub const INDIRECT: SecurityAlgorithm
Reserved for Indirect Keys
This value is reserved by RFC 4034.
Sourcepub const PRIVATEDNS: SecurityAlgorithm
pub const PRIVATEDNS: SecurityAlgorithm
A private algorithm identified by a domain name.
This value is defined in RFC 4034.
Sourcepub const PRIVATEOID: SecurityAlgorithm
pub const PRIVATEOID: SecurityAlgorithm
A private algorithm identified by a ISO OID.
This value is defined in RFC 4034.
Source§impl SecurityAlgorithm
impl SecurityAlgorithm
pub const COMPOSE_LEN: u16 = 1u16
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.
Sourcepub const fn to_mnemonic_str(self) -> Option<&'static str>
pub const fn to_mnemonic_str(self) -> Option<&'static str>
Returns the mnemonic as a &str
for this value if there is one
pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>
pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Source§impl SecurityAlgorithm
impl SecurityAlgorithm
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for SecurityAlgorithm
impl<'arbitrary> Arbitrary<'arbitrary> for SecurityAlgorithm
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read moreSource§impl Clone for SecurityAlgorithm
impl Clone for SecurityAlgorithm
Source§fn clone(&self) -> SecurityAlgorithm
fn clone(&self) -> SecurityAlgorithm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SecurityAlgorithm
impl Debug for SecurityAlgorithm
Source§impl<'de> Deserialize<'de> for SecurityAlgorithm
impl<'de> Deserialize<'de> for SecurityAlgorithm
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for SecurityAlgorithm
impl Display for SecurityAlgorithm
Source§impl<'a> From<&'a SecurityAlgorithm> for u8
impl<'a> From<&'a SecurityAlgorithm> for u8
Source§fn from(value: &'a SecurityAlgorithm) -> Self
fn from(value: &'a SecurityAlgorithm) -> Self
Source§impl From<SecurityAlgorithm> for u8
impl From<SecurityAlgorithm> for u8
Source§fn from(value: SecurityAlgorithm) -> Self
fn from(value: SecurityAlgorithm) -> Self
Source§impl From<u8> for SecurityAlgorithm
impl From<u8> for SecurityAlgorithm
Source§impl FromStr for SecurityAlgorithm
impl FromStr for SecurityAlgorithm
Source§impl Hash for SecurityAlgorithm
impl Hash for SecurityAlgorithm
Source§impl Ord for SecurityAlgorithm
impl Ord for SecurityAlgorithm
Source§fn cmp(&self, other: &SecurityAlgorithm) -> Ordering
fn cmp(&self, other: &SecurityAlgorithm) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SecurityAlgorithm
impl PartialEq for SecurityAlgorithm
Source§impl PartialOrd for SecurityAlgorithm
impl PartialOrd for SecurityAlgorithm
Source§impl Serialize for SecurityAlgorithm
impl Serialize for SecurityAlgorithm
Source§impl ZonefileFmt for SecurityAlgorithm
impl ZonefileFmt for SecurityAlgorithm
Source§fn fmt(&self, p: &mut impl Formatter) -> Result
fn fmt(&self, p: &mut impl Formatter) -> Result
fmt::Formatter
Read more