Package org.minidns.record
Class DNSKEY
java.lang.Object
org.minidns.record.Data
org.minidns.record.DNSKEY
DNSKEY record payload.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe public key's cryptographic algorithm used.final byteThe byte value of the public key's cryptographic algorithm used.static final shortWhether the record holds a revoked key.static final shortWhether the key should be used as a secure entry point key.static final shortWhether the record holds a DNS zone key.final shortfinal byteMust bePROTOCOL_RFC4034.static final byteUse the protocol defined in RFC 4034. -
Constructor Summary
ConstructorsConstructorDescriptionDNSKEY(short flags, byte protocol, byte algorithm, byte[] key) DNSKEY(short flags, byte protocol, DnssecConstants.SignatureAlgorithm algorithm, byte[] key) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getKey()intintRetrieve the key tag identifying this DNSKEY.getType()The payload type.booleanbooleankeyEquals(byte[] otherKey) static DNSKEYparse(DataInputStream dis, int length) voidThe 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:DataThe 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: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
-
getKeyLength
public int getKeyLength() -
getKey
public byte[] getKey() -
getKeyAsDataInputStream
-
getKeyBase64
-
getKeyBigInteger
-
keyEquals
public boolean keyEquals(byte[] otherKey) -
isSecureEntryPoint
public boolean isSecureEntryPoint()
-