Enum domain::base::iana::secalg::SecAlg

source ·
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

source

pub const fn from_int(value: u8) -> Self

Returns a value from its raw integer value.

source

pub const fn to_int(self) -> u8

Returns the raw integer value for a value.

source

pub fn from_mnemonic(m: &[u8]) -> Option<Self>

Returns a value from a well-defined mnemonic.

source

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.

source

pub fn parse<'a, Octs: AsRef<[u8]> + ?Sized>( parser: &mut Parser<'a, Octs>, ) -> Result<Self, ParseError>

source

pub const COMPOSE_LEN: u16 = 1u16

source

pub fn compose<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

source§

impl SecAlg

source

pub fn from_bytes(bytes: &[u8]) -> Option<Self>

source§

impl SecAlg

source

pub fn scan<S: Scanner>(scanner: &mut S) -> Result<Self, S::Error>

Trait Implementations§

source§

impl Clone for SecAlg

source§

fn clone(&self) -> SecAlg

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SecAlg

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for SecAlg

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a SecAlg> for u8

source§

fn from(value: &'a SecAlg) -> Self

Converts to this type from the input type.
source§

impl From<SecAlg> for u8

source§

fn from(value: SecAlg) -> Self

Converts to this type from the input type.
source§

impl From<u8> for SecAlg

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl FromStr for SecAlg

§

type Err = FromStrError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for SecAlg

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for SecAlg

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<SecAlg> for u8

source§

fn eq(&self, other: &SecAlg) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u8> for SecAlg

source§

fn eq(&self, other: &u8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for SecAlg

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<SecAlg> for u8

source§

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 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<u8> for SecAlg

source§

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 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd for SecAlg

source§

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 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for SecAlg

source§

impl Eq for SecAlg

Auto Trait Implementations§

§

impl Freeze for SecAlg

§

impl RefUnwindSafe for SecAlg

§

impl Send for SecAlg

§

impl Sync for SecAlg

§

impl Unpin for SecAlg

§

impl UnwindSafe for SecAlg

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Source, Target> OctetsInto<Target> for Source
where Target: OctetsFrom<Source>,

§

type Error = <Target as OctetsFrom<Source>>::Error

source§

fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>

Performs the conversion.
source§

fn octets_into(self) -> Target
where Self::Error: Into<Infallible>,

Performs an infallible conversion.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more