Package org.xbill.DNS

Class KEYBase

java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.KEYBase
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Record>
Direct Known Subclasses:
DNSKEYRecord, KEYRecord

abstract class KEYBase extends Record
The base class for KEY/DNSKEY records, which have identical formats
  • Field Details

    • flags

      protected int flags
    • proto

      protected int proto
    • alg

      protected int alg
    • key

      protected byte[] key
    • footprint

      protected int footprint
    • publicKey

      protected PublicKey publicKey
  • Constructor Details

    • KEYBase

      protected KEYBase()
    • KEYBase

      protected KEYBase(Name name, int type, int dclass, long ttl, int flags, int proto, int alg, byte[] key)
  • Method Details

    • rrFromWire

      protected void rrFromWire(DNSInput in) throws IOException
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden
      Specified by:
      rrFromWire in class Record
      Throws:
      IOException
    • rrToString

      protected String rrToString()
      Converts the DNSKEY/KEY Record to a String
      Specified by:
      rrToString in class Record
    • getFlags

      public int getFlags()
      Returns the flags describing the key's properties
    • getProtocol

      public int getProtocol()
      Returns the protocol that the key was created for
    • getAlgorithm

      public int getAlgorithm()
      Returns the key's algorithm
    • getKey

      public byte[] getKey()
      Returns the binary data representing the key
    • getFootprint

      public int getFootprint()
      Returns the key's footprint (after computing it)
    • getPublicKey

      public PublicKey getPublicKey() throws DNSSEC.DNSSECException
      Returns a PublicKey corresponding to the data in this key.
      Throws:
      DNSSEC.DNSSECException - The key could not be converted.
    • rrToWire

      protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden.
      Specified by:
      rrToWire in class Record