class DNS::Zone::RR::SSHFP
`SSHFP` resource record.
RFC 4255
Constants
- REGEX_SSHFP_RDATA
Attributes
algorithm_number[RW]
fingerprint[RW]
fingerprint_type[RW]
Public Instance Methods
dump()
click to toggle source
# File lib/dns/zone/rr/sshfp.rb, line 14 def dump parts = general_prefix parts << algorithm_number parts << fingerprint_type parts << fingerprint parts.join(' ') end
load(string, options = {})
click to toggle source
# File lib/dns/zone/rr/sshfp.rb, line 22 def load(string, options = {}) rdata = load_general_and_get_rdata(string, options) return nil unless rdata captures = rdata.match(REGEX_SSHFP_RDATA) return nil unless captures @algorithm_number = captures[:algorithm_number].to_i @fingerprint_type = captures[:fingerprint_type].to_i @fingerprint = captures[:fingerprint] self end