Class: DNS::Zone::RR::NSEC3
Overview
‘NSEC3` resource record.
RFC 5155
Constant Summary collapse
- REGEX_NSEC3_RDATA =
%r{ (?<algorithm>\d+)\s* (?<flags>\d+)\s* (?<iterations>\d+)\s* (?<salt>\S+)\s* (?<next_hashed_owner_name>\S+)\s* (?<rrset_types>#{DNS::Zone::RR::REGEX_STRING})\s* }mx
Instance Attribute Summary collapse
-
#algorithm ⇒ Object
Returns the value of attribute algorithm.
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#iterations ⇒ Object
Returns the value of attribute iterations.
-
#next_hashed_owner_name ⇒ Object
Returns the value of attribute next_hashed_owner_name.
-
#rrset_types ⇒ Object
Returns the value of attribute rrset_types.
-
#salt ⇒ Object
Returns the value of attribute salt.
Attributes inherited from Record
Instance Method Summary collapse
Methods inherited from Record
#general_prefix, #initialize, #load_general_and_get_rdata, #type
Constructor Details
This class inherits a constructor from DNS::Zone::RR::Record
Instance Attribute Details
#algorithm ⇒ Object
Returns the value of attribute algorithm.
15 16 17 |
# File 'lib/dns/zone/rr/nsec3.rb', line 15 def algorithm @algorithm end |
#flags ⇒ Object
Returns the value of attribute flags.
15 16 17 |
# File 'lib/dns/zone/rr/nsec3.rb', line 15 def flags @flags end |
#iterations ⇒ Object
Returns the value of attribute iterations.
15 16 17 |
# File 'lib/dns/zone/rr/nsec3.rb', line 15 def iterations @iterations end |
#next_hashed_owner_name ⇒ Object
Returns the value of attribute next_hashed_owner_name.
15 16 17 |
# File 'lib/dns/zone/rr/nsec3.rb', line 15 def next_hashed_owner_name @next_hashed_owner_name end |
#rrset_types ⇒ Object
Returns the value of attribute rrset_types.
15 16 17 |
# File 'lib/dns/zone/rr/nsec3.rb', line 15 def rrset_types @rrset_types end |
#salt ⇒ Object
Returns the value of attribute salt.
15 16 17 |
# File 'lib/dns/zone/rr/nsec3.rb', line 15 def salt @salt end |
Instance Method Details
#dump ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/dns/zone/rr/nsec3.rb', line 18 def dump parts = general_prefix parts << algorithm parts << flags parts << iterations parts << salt parts << next_hashed_owner_name parts << rrset_types parts.join(' ') end |
#load(string, options = {}) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/dns/zone/rr/nsec3.rb', line 29 def load(string, = {}) rdata = load_general_and_get_rdata(string, ) return nil unless rdata captures = rdata.match(REGEX_NSEC3_RDATA) return nil unless captures @algorithm = captures[:algorithm].to_i @flags = captures[:flags].to_i @iterations = captures[:iterations].to_i @salt = captures[:salt] @next_hashed_owner_name = captures[:next_hashed_owner_name] @rrset_types = captures[:rrset_types] self end |