java.lang.Object
org.minidns.record.Data
org.minidns.record.OPENPGPKEY

public class OPENPGPKEYextends Data
DNS OPENPGPKEY record payload for OpenPGP public keys.
Associates OpenPGP public keys with domain names for secure email and code signing applications.
  • Field Details

    • publicKeyPacket

      private final byte[] publicKeyPacket
      The OpenPGP key packet, as raw bytes.
    • publicKeyPacketBase64Cache

      private transient String publicKeyPacketBase64Cache
      Base64 of the packet, computed once and kept
  • Constructor Details

    • OPENPGPKEY

      OPENPGPKEY(byte[] publicKeyPacket)
      Create an OPENPGPKEY record
      Parameters:
      publicKeyPacket - the public key packet data
  • Method Details

    • parse

      public static OPENPGPKEY parse(DataInputStream dis, int length) throws IOException
      Parse an OPENPGPKEY record from a data input stream.
      Parameters:
      dis - the data input stream
      length - the record length
      Returns:
      the parsed OPENPGPKEY record
      Throws:
      IOException - if reading fails
    • getType

      public Record.TYPE getType()
      Description copied from class: Data
      The payload type.
      Specified by:
      getType in class Data
      Returns:
      The DNS record type of this payload.
    • serialize

      public void serialize(DataOutputStream dos) throws IOException
      Description copied from class: Data
      The internal method used to serialize Data subclasses.
      Specified by:
      serialize in class Data
      Parameters:
      dos - the output stream to serialize to.
      Throws:
      IOException - if an I/O error occurs.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPublicKeyPacketBase64

      public String getPublicKeyPacketBase64()
      Get the public key packet as a Base64-encoded string
      Returns:
      the Base64-encoded public key packet
    • getPublicKeyPacket

      public byte[] getPublicKeyPacket()
      Get the public key packet data
      Returns:
      a copy of the public key packet