Package org.xbill.DNS
Class DNSKEYRecord
java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.DNSKEYRecord
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Record>
- Direct Known Subclasses:
CDNSKEYRecord
Key - contains a cryptographic public key for use by DNS. The data can be converted to objects
implementing java.security.interfaces.PublicKey
- Author:
- Brian Wellington
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDNSKEYflags as defined in the IANA registry.static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected byte[]protected intprotected PublicKey -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDNSKEYRecord(Name name, int type, int dclass, long ttl, int flags, int proto, int alg, byte[] key) Creates a DNSKEY Record from the given dataDNSKEYRecord(Name name, int dclass, long ttl, int flags, int proto, int alg, byte[] key) Creates a DNSKEY Record from the given dataDNSKEYRecord(Name name, int dclass, long ttl, int flags, int proto, int alg, PublicKey key) Creates a DNSKEY Record from the given data -
Method Summary
Modifier and TypeMethodDescriptionintReturns the key's algorithmintgetFlags()Returns the flags describing the key's propertiesintReturns the key's footprint (after computing it)byte[]getKey()Returns the binary data representing the keyintReturns the protocol that the key was created forReturns a PublicKey corresponding to the data in this key.protected voidrdataFromString(Tokenizer st, Name origin) Converts the text format of an RR to the internal format - must be overridenprotected voidrrFromWire(DNSInput in) Converts the type-specific RR to wire format - must be overriddenprotected StringConverts the DNSKEY/KEY Record to a Stringprotected voidrrToWire(DNSOutput out, Compression c, boolean canonical) Converts the type-specific RR to wire format - must be overridden.Methods inherited from class org.xbill.DNS.Record
byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getAdditionalName, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName
-
Field Details
-
flags
protected int flags -
proto
protected int proto -
alg
protected int alg -
key
protected byte[] key -
footprint
protected int footprint -
publicKey
-
-
Constructor Details
-
DNSKEYRecord
protected DNSKEYRecord(Name name, int type, int dclass, long ttl, int flags, int proto, int alg, byte[] key) Creates a DNSKEY Record from the given data- Parameters:
flags- Flags describing the key's propertiesproto- The protocol that the key was created foralg- The key's algorithmkey- Binary representation of the key
-
DNSKEYRecord
Creates a DNSKEY Record from the given data- Parameters:
flags- Flags describing the key's propertiesproto- The protocol that the key was created foralg- The key's algorithmkey- Binary representation of the key
-
DNSKEYRecord
public DNSKEYRecord(Name name, int dclass, long ttl, int flags, int proto, int alg, PublicKey key) throws DNSSEC.DNSSECException Creates a DNSKEY Record from the given data- Parameters:
flags- Flags describing the key's propertiesproto- The protocol that the key was created foralg- The key's algorithmkey- The key as a PublicKey- Throws:
DNSSEC.DNSSECException- The PublicKey could not be converted into DNS format.
-
-
Method Details
-
rdataFromString
Description copied from class:RecordConverts the text format of an RR to the internal format - must be overriden- Specified by:
rdataFromStringin classRecord- Throws:
IOException
-
rrFromWire
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden- Specified by:
rrFromWirein classRecord- Throws:
IOException
-
rrToString
Converts the DNSKEY/KEY Record to a String- Specified by:
rrToStringin classRecord
-
getFlags
public int getFlags()Returns the flags describing the key's properties -
getProtocol
public int getProtocol()Returns the protocol that the key was created for -
getAlgorithm
public int getAlgorithm()Returns the key's algorithm -
getKey
public byte[] getKey()Returns the binary data representing the key -
getFootprint
public int getFootprint()Returns the key's footprint (after computing it) -
getPublicKey
Returns a PublicKey corresponding to the data in this key.- Throws:
DNSSEC.DNSSECException- The key could not be converted.
-
rrToWire
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden.
-