pub struct NSEC3PARAM { /* private fields */ }
Available on crate feature dnssec only.
Expand description

RFC 5155, NSEC3, March 2008

4.  The NSEC3PARAM Resource Record

   The NSEC3PARAM RR contains the NSEC3 parameters (hash algorithm,
   flags, iterations, and salt) needed by authoritative servers to
   calculate hashed owner names.  The presence of an NSEC3PARAM RR at a
   zone apex indicates that the specified parameters may be used by
   authoritative servers to choose an appropriate set of NSEC3 RRs for
   negative responses.  The NSEC3PARAM RR is not used by validators or
   resolvers.

   If an NSEC3PARAM RR is present at the apex of a zone with a Flags
   field value of zero, then there MUST be an NSEC3 RR using the same
   hash algorithm, iterations, and salt parameters present at every
   hashed owner name in the zone.  That is, the zone MUST contain a
   complete set of NSEC3 RRs with the same hash algorithm, iterations,
   and salt parameters.

   The owner name for the NSEC3PARAM RR is the name of the zone apex.

   The type value for the NSEC3PARAM RR is 51.

   The NSEC3PARAM RR RDATA format is class independent and is described
   below.

   The class MUST be the same as the NSEC3 RRs to which this RR refers.

4.2.  NSEC3PARAM RDATA Wire Format

 The RDATA of the NSEC3PARAM RR is as shown below:

                      1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |   Hash Alg.   |     Flags     |          Iterations           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Salt Length  |                     Salt                      /
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 Hash Algorithm is a single octet.

 Flags field is a single octet.

 Iterations is represented as a 16-bit unsigned integer, with the most
 significant bit first.

 Salt Length is represented as an unsigned octet.  Salt Length
 represents the length of the following Salt field in octets.  If the
 value is zero, the Salt field is omitted.

 Salt, if present, is encoded as a sequence of binary octets.  The
 length of this field is determined by the preceding Salt Length
 field.

Implementations§

source§

impl NSEC3PARAM

source

pub fn new( hash_algorithm: Nsec3HashAlgorithm, opt_out: bool, iterations: u16, salt: Vec<u8> ) -> Self

Constructs a new NSEC3PARAM RData for use in a Resource Record

source

pub fn hash_algorithm(&self) -> Nsec3HashAlgorithm

RFC 5155, NSEC3, March 2008

4.1.1.  Hash Algorithm

   The Hash Algorithm field identifies the cryptographic hash algorithm
   used to construct the hash-value.

   The acceptable values are the same as the corresponding field in the
   NSEC3 RR.
source

pub fn opt_out(&self) -> bool

RFC 5155, NSEC3, March 2008

4.1.2.  Flag Fields

   The Opt-Out flag is not used and is set to zero.

   All other flags are reserved for future use, and must be zero.

   NSEC3PARAM RRs with a Flags field value other than zero MUST be
   ignored.
source

pub fn iterations(&self) -> u16

RFC 5155, NSEC3, March 2008

4.1.3.  Iterations

   The Iterations field defines the number of additional times the hash
   is performed.

   Its acceptable values are the same as the corresponding field in the
   NSEC3 RR.
source

pub fn salt(&self) -> &[u8]

RFC 5155, NSEC3, March 2008

4.1.5.  Salt

   The Salt field is appended to the original owner name before hashing.
source

pub fn flags(&self) -> u8

flags for encoding

Trait Implementations§

source§

impl<'r> BinDecodable<'r> for NSEC3PARAM

source§

fn read(decoder: &mut BinDecoder<'r>) -> ProtoResult<Self>

Read the type from the stream
source§

fn from_bytes(bytes: &'r [u8]) -> ProtoResult<Self>

Returns the object in binary form
source§

impl BinEncodable for NSEC3PARAM

source§

fn emit(&self, encoder: &mut BinEncoder<'_>) -> ProtoResult<()>

Write the type to the stream
source§

fn to_bytes(&self) -> ProtoResult<Vec<u8>>

Returns the object in binary form
source§

impl Clone for NSEC3PARAM

source§

fn clone(&self) -> NSEC3PARAM

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 NSEC3PARAM

source§

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

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

impl<'de> Deserialize<'de> for NSEC3PARAM

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for NSEC3PARAM

RFC 5155, NSEC3, March 2008

4.3.  Presentation Format

   The presentation format of the RDATA portion is as follows:

   o  The Hash Algorithm field is represented as an unsigned decimal
      integer.  The value has a maximum of 255.

   o  The Flags field is represented as an unsigned decimal integer.
      The value has a maximum value of 255.

   o  The Iterations field is represented as an unsigned decimal
      integer.  The value is between 0 and 65535, inclusive.

   o  The Salt Length field is not represented.

   o  The Salt field is represented as a sequence of case-insensitive
      hexadecimal digits.  Whitespace is not allowed within the
      sequence.  This field is represented as "-" (without the quotes)
      when the Salt Length field is zero.
source§

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

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

impl Hash for NSEC3PARAM

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 PartialEq for NSEC3PARAM

source§

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

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

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

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

impl RecordData for NSEC3PARAM

source§

fn try_from_rdata(data: RData) -> Result<Self, RData>

Attempts to convert to this RecordData from the RData type, if it is not the correct type the original is returned
source§

fn try_borrow(data: &RData) -> Option<&Self>

Attempts to borrow this RecordData from the RData type, if it is not the correct type the original is returned
source§

fn record_type(&self) -> RecordType

Get the associated RecordType for the RecordData
source§

fn into_rdata(self) -> RData

Converts this RecordData into generic RecordData
source§

impl Serialize for NSEC3PARAM

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NSEC3PARAM

source§

impl StructuralEq for NSEC3PARAM

source§

impl StructuralPartialEq for NSEC3PARAM

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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 Twhere 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<T> ToOwned for Twhere 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 Twhere 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 Twhere 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 Twhere 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.
§

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

§

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

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,