Package org.minidns.record
Class DNSKEY
- java.lang.Object
-
- org.minidns.record.Data
-
- org.minidns.record.DNSKEY
-
-
Field Summary
Fields Modifier and Type Field Description DnssecConstants.SignatureAlgorithm
algorithm
The public key's cryptographic algorithm used.byte
algorithmByte
The byte value of the public key's cryptographic algorithm used.static short
FLAG_REVOKE
Whether the record holds a revoked key.static short
FLAG_SECURE_ENTRY_POINT
Whether the key should be used as a secure entry point key.static short
FLAG_ZONE
Whether the record holds a DNS zone key.short
flags
byte
protocol
Must bePROTOCOL_RFC4034
.static byte
PROTOCOL_RFC4034
Use the protocol defined in RFC 4034.
-
Constructor Summary
Constructors Constructor Description DNSKEY(short flags, byte protocol, byte algorithm, byte[] key)
DNSKEY(short flags, byte protocol, DnssecConstants.SignatureAlgorithm algorithm, byte[] key)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getKey()
java.io.DataInputStream
getKeyAsDataInputStream()
java.lang.String
getKeyBase64()
java.math.BigInteger
getKeyBigInteger()
int
getKeyLength()
int
getKeyTag()
Retrieve the key tag identifying this DNSKEY.Record.TYPE
getType()
The payload type.boolean
isSecureEntryPoint()
boolean
keyEquals(byte[] otherKey)
static DNSKEY
parse(java.io.DataInputStream dis, int length)
void
serialize(java.io.DataOutputStream dos)
The internal method used to serialize Data subclasses.java.lang.String
toString()
-
Methods inherited from class org.minidns.record.Data
equals, hashCode, length, toByteArray, toOutputStream, toOutputStream
-
-
-
-
Field Detail
-
FLAG_SECURE_ENTRY_POINT
public static final short FLAG_SECURE_ENTRY_POINT
Whether the key should be used as a secure entry point key. see RFC 3757- See Also:
- Constant Field Values
-
FLAG_REVOKE
public static final short FLAG_REVOKE
Whether the record holds a revoked key.- See Also:
- Constant Field Values
-
FLAG_ZONE
public static final short FLAG_ZONE
Whether the record holds a DNS zone key.- See Also:
- Constant Field Values
-
PROTOCOL_RFC4034
public static final byte PROTOCOL_RFC4034
Use the protocol defined in RFC 4034.- See Also:
- Constant Field Values
-
flags
public final short flags
- See Also:
- IANA - DNSKEY RR Flags
-
protocol
public final byte protocol
Must bePROTOCOL_RFC4034
.
-
algorithm
public final DnssecConstants.SignatureAlgorithm algorithm
The public key's cryptographic algorithm used.
-
algorithmByte
public final byte algorithmByte
The byte value of the public key's cryptographic algorithm used.
-
-
Constructor Detail
-
DNSKEY
public DNSKEY(short flags, byte protocol, byte algorithm, byte[] key)
-
DNSKEY
public DNSKEY(short flags, byte protocol, DnssecConstants.SignatureAlgorithm algorithm, byte[] key)
-
-
Method Detail
-
parse
public static DNSKEY parse(java.io.DataInputStream dis, int length) throws java.io.IOException
- Throws:
java.io.IOException
-
getType
public Record.TYPE 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
public void serialize(java.io.DataOutputStream dos) throws java.io.IOException
Description copied from class:Data
The internal method used to serialize Data subclasses.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getKeyLength
public int getKeyLength()
-
getKey
public byte[] getKey()
-
getKeyAsDataInputStream
public java.io.DataInputStream getKeyAsDataInputStream()
-
getKeyBase64
public java.lang.String getKeyBase64()
-
getKeyBigInteger
public java.math.BigInteger getKeyBigInteger()
-
keyEquals
public boolean keyEquals(byte[] otherKey)
-
isSecureEntryPoint
public boolean isSecureEntryPoint()
-
-