Method: Dnsruby::RR::NSEC3.decode_rdata
- Defined in:
- lib/dnsruby/resource/NSEC3.rb
.decode_rdata(msg) ⇒ Object
:nodoc: all
317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/dnsruby/resource/NSEC3.rb', line 317 def self.decode_rdata(msg) #:nodoc: all hash_alg, flags, iterations, salt_length = msg.get_unpack('ccnc') # Salt may be omitted salt = [] if salt_length > 0 salt = msg.get_bytes(salt_length) end hash_length, = msg.get_unpack('c') next_hashed = msg.get_bytes(hash_length) types = NSEC.decode_types(msg.get_bytes) return self.new( [hash_alg, flags, iterations, salt_length, salt, hash_length, next_hashed, types]) end |