Package org.minidns.record
Class DNSKEY
java.lang.Object
org.minidns.record.Data
org.minidns.record.DNSKEY
DNSKEY record payload.
-
Field Summary
Modifier and TypeFieldDescriptionThe public key's cryptographic algorithm used.final byte
The byte value of the public key's cryptographic algorithm used.static final short
Whether the record holds a revoked key.static final short
Whether the key should be used as a secure entry point key.static final short
Whether the record holds a DNS zone key.final short
final byte
Must bePROTOCOL_RFC4034
.static final byte
Use the protocol defined in RFC 4034. -
Constructor Summary
ConstructorDescriptionDNSKEY
(short flags, byte protocol, byte algorithm, byte[] key) DNSKEY
(short flags, byte protocol, DnssecConstants.SignatureAlgorithm algorithm, byte[] key) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getKey()
int
int
Retrieve the key tag identifying this DNSKEY.getType()
The payload type.boolean
boolean
keyEquals
(byte[] otherKey) static DNSKEY
parse
(DataInputStream dis, int length) void
The internal method used to serialize Data subclasses.toString()
Methods inherited from class org.minidns.record.Data
equals, hashCode, length, toByteArray, toOutputStream, toOutputStream
-
Field Details
-
FLAG_SECURE_ENTRY_POINT
public static final short FLAG_SECURE_ENTRY_POINTWhether the key should be used as a secure entry point key. see RFC 3757- See Also:
-
FLAG_REVOKE
public static final short FLAG_REVOKEWhether the record holds a revoked key.- See Also:
-
FLAG_ZONE
public static final short FLAG_ZONEWhether the record holds a DNS zone key.- See Also:
-
PROTOCOL_RFC4034
public static final byte PROTOCOL_RFC4034Use the protocol defined in RFC 4034.- See Also:
-
flags
public final short flags- See Also:
-
protocol
public final byte protocolMust bePROTOCOL_RFC4034
. -
algorithm
The public key's cryptographic algorithm used. -
algorithmByte
public final byte algorithmByteThe byte value of the public key's cryptographic algorithm used.
-
-
Constructor Details
-
DNSKEY
public DNSKEY(short flags, byte protocol, byte algorithm, byte[] key) -
DNSKEY
-
-
Method Details
-
parse
- Throws:
IOException
-
getType
Description copied from class:Data
The payload type. -
getKeyTag
public int getKeyTag()Retrieve the key tag identifying this DNSKEY. The key tag is used within the DS and RRSIG record to distinguish multiple keys for the same name. This implementation is based on the reference implementation shown in RFC 4034 Appendix B.- Returns:
- this DNSKEY's key tag
-
serialize
Description copied from class:Data
The internal method used to serialize Data subclasses.- Specified by:
serialize
in classData
- Parameters:
dos
- the output stream to serialize to.- Throws:
IOException
- if an I/O error occurs.
-
toString
-
getKeyLength
public int getKeyLength() -
getKey
public byte[] getKey() -
getKeyAsDataInputStream
-
getKeyBase64
-
getKeyBigInteger
-
keyEquals
public boolean keyEquals(byte[] otherKey) -
isSecureEntryPoint
public boolean isSecureEntryPoint()
-