Struct trust_dns_proto::rr::dnssec::rdata::nsec3param::NSEC3PARAM
source · [−]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
sourceimpl NSEC3PARAM
impl NSEC3PARAM
sourcepub fn new(
hash_algorithm: Nsec3HashAlgorithm,
opt_out: bool,
iterations: u16,
salt: Vec<u8>
) -> Self
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
sourcepub fn hash_algorithm(&self) -> Nsec3HashAlgorithm
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.
sourcepub fn opt_out(&self) -> bool
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.
sourcepub fn iterations(&self) -> u16
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.
Trait Implementations
sourceimpl Clone for NSEC3PARAM
impl Clone for NSEC3PARAM
sourcefn clone(&self) -> NSEC3PARAM
fn clone(&self) -> NSEC3PARAM
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NSEC3PARAM
impl Debug for NSEC3PARAM
sourceimpl<'de> Deserialize<'de> for NSEC3PARAM
impl<'de> Deserialize<'de> for NSEC3PARAM
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for NSEC3PARAM
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.
sourceimpl Hash for NSEC3PARAM
impl Hash for NSEC3PARAM
sourceimpl PartialEq<NSEC3PARAM> for NSEC3PARAM
impl PartialEq<NSEC3PARAM> for NSEC3PARAM
sourcefn eq(&self, other: &NSEC3PARAM) -> bool
fn eq(&self, other: &NSEC3PARAM) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for NSEC3PARAM
impl Serialize for NSEC3PARAM
impl Eq for NSEC3PARAM
impl StructuralEq for NSEC3PARAM
impl StructuralPartialEq for NSEC3PARAM
Auto Trait Implementations
impl RefUnwindSafe for NSEC3PARAM
impl Send for NSEC3PARAM
impl Sync for NSEC3PARAM
impl Unpin for NSEC3PARAM
impl UnwindSafe for NSEC3PARAM
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more