java.lang.Object
org.minidns.record.Data
org.minidns.record.OPENPGPKEY
DNS OPENPGPKEY record payload for OpenPGP public keys.
Associates OpenPGP public keys with domain names for secure email and code signing applications.
Associates OpenPGP public keys with domain names for secure email and code signing applications.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]The OpenPGP key packet, as raw bytes.private StringBase64 of the packet, computed once and keptConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbyte[]Get the public key packet dataGet the public key packet as a Base64-encoded stringgetType()The payload type.static OPENPGPKEYparse(DataInputStream dis, int length) Parse an OPENPGPKEY record from a data input stream.voidThe internal method used to serialize Data subclasses.toString()Methods inherited from class Data
equals, hashCode, length, toByteArray, toOutputStream, toOutputStreamModifier and TypeMethodDescriptionfinal booleanfinal inthashCode()final intlength()Serialize this record, if that has not been done already, and report the resulting wire size.final byte[]Serialize this record, if that has not been done already, and return a copy of the result so callers cannot mutate the cached bytes.final voidWrite the binary representation of this payload to the givenDataOutputStream.final voidtoOutputStream(OutputStream outputStream) Write the binary representation to the given OutputStream.
Field Details
publicKeyPacket
private final byte[] publicKeyPacketThe OpenPGP key packet, as raw bytes.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
Parse an OPENPGPKEY record from a data input stream.- Parameters:
dis- the data input streamlength- the record length- Returns:
- the parsed OPENPGPKEY record
- Throws:
IOException- if reading fails
getType
Description copied from class:DataThe payload type.serialize
Description copied from class:DataThe internal method used to serialize Data subclasses.- Specified by:
serializein classData- Parameters:
dos- the output stream to serialize to.- Throws:
IOException- if an I/O error occurs.
toString
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