Package org.xbill.DNS
Class TKEYRecord
java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.TKEYRecord
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Record>
Transaction Key - used to compute and/or securely transport a shared secret to be used with TSIG.
- Author:
- Brian Wellington
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe key should be deletedstatic final intThe key is computed using a Diffie-Hellman key exchangestatic final intThe key is computed using GSS_API (unimplemented)static final intThe key is assigned by the resolver (unimplemented)static final intThe key is assigned by the server (unimplemented) -
Constructor Summary
ConstructorsConstructorDescriptionTKEYRecord(Name name, int dclass, long ttl, Name alg, Instant timeInception, Instant timeExpire, int mode, int error, byte[] key, byte[] other) Creates a TKEY Record from the given data.TKEYRecord(Name name, int dclass, long ttl, Name alg, Date timeInception, Date timeExpire, int mode, int error, byte[] key, byte[] other) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionReturns the shared key's algorithmintgetError()Returns the extended errorbyte[]getKey()Returns the shared secret or keying materialintgetMode()Returns the key agreement modebyte[]getOther()Returns the other dataReturns the end of the validity period of the shared secret or keying materialReturns the beginning of the validity period of the shared secret or keying materialprotected Stringprotected 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 rdata 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
-
SERVERASSIGNED
public static final int SERVERASSIGNEDThe key is assigned by the server (unimplemented)- See Also:
-
DIFFIEHELLMAN
public static final int DIFFIEHELLMANThe key is computed using a Diffie-Hellman key exchange- See Also:
-
GSSAPI
public static final int GSSAPIThe key is computed using GSS_API (unimplemented)- See Also:
-
RESOLVERASSIGNED
public static final int RESOLVERASSIGNEDThe key is assigned by the resolver (unimplemented)- See Also:
-
DELETE
public static final int DELETEThe key should be deleted- See Also:
-
-
Constructor Details
-
TKEYRecord
public TKEYRecord(Name name, int dclass, long ttl, Name alg, Instant timeInception, Instant timeExpire, int mode, int error, byte[] key, byte[] other) Creates a TKEY Record from the given data.- Parameters:
alg- The shared key's algorithmtimeInception- The beginning of the validity period of the shared secret or keying materialtimeExpire- The end of the validity period of the shared secret or keying materialmode- The mode of key agreementerror- The extended error field. Should be 0 in querieskey- The shared secretother- The other data field. Currently unused responses.
-
TKEYRecord
@Deprecated public TKEYRecord(Name name, int dclass, long ttl, Name alg, Date timeInception, Date timeExpire, int mode, int error, byte[] key, byte[] other) Creates a TKEY Record from the given data.- Parameters:
alg- The shared key's algorithmtimeInception- The beginning of the validity period of the shared secret or keying materialtimeExpire- The end of the validity period of the shared secret or keying materialmode- The mode of key agreementerror- The extended error field. Should be 0 in querieskey- The shared secretother- The other data field. Currently unused responses.
-
-
Method Details
-
rrFromWire
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden- Specified by:
rrFromWirein classRecord- Throws:
IOException
-
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
-
modeString
-
rrToString
Converts rdata to a String- Specified by:
rrToStringin classRecord
-
getAlgorithm
Returns the shared key's algorithm -
getTimeInception
Returns the beginning of the validity period of the shared secret or keying material -
getTimeExpire
Returns the end of the validity period of the shared secret or keying material -
getMode
public int getMode()Returns the key agreement mode -
getError
public int getError()Returns the extended error -
getKey
public byte[] getKey()Returns the shared secret or keying material -
getOther
public byte[] getOther()Returns the other data -
rrToWire
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden.
-
TKEYRecord(Name, int, long, Name, Instant, Instant, int, int, byte[], byte[])