Package org.xbill.DNS
Class TSIGRecord
java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.TSIGRecord
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Record>
Transaction Signature - this record is automatically generated by the resolver. TSIG records
provide transaction security between the sender and receiver of a message, using a shared key.
- Author:
- Brian Wellington
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTSIGRecord
(Name name, int dclass, long ttl, Name alg, Instant timeSigned, Duration fudge, byte[] signature, int originalID, int error, byte[] other) Creates a TSIG Record from the given data.TSIGRecord
(Name name, int dclass, long ttl, Name alg, Date timeSigned, int fudge, byte[] signature, int originalID, int error, byte[] other) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionReturns the shared key's algorithmint
getError()
Returns the extended errorgetFudge()
Returns the time fudge factorint
Returns the original message IDbyte[]
getOther()
Returns the other databyte[]
Returns the signatureReturns the time that this record was generatedprotected void
rdataFromString
(Tokenizer st, Name origin) Converts the text format of an RR to the internal format - must be overridenprotected void
rrFromWire
(DNSInput in) Converts the type-specific RR to wire format - must be overriddenprotected String
Converts rdata to a Stringprotected void
rrToWire
(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
-
Constructor Details
-
TSIGRecord
@Deprecated public TSIGRecord(Name name, int dclass, long ttl, Name alg, Date timeSigned, int fudge, byte[] signature, int originalID, int error, byte[] other) Creates a TSIG Record from the given data. This is normally called by the TSIG class- Parameters:
alg
- The shared key's algorithmtimeSigned
- The time that this record was generatedfudge
- The fudge factor for time - if the time that the message is received is not in the range [now - fudge, now + fudge], the signature failssignature
- The signatureoriginalID
- The message ID at the time of its generationerror
- The extended error field. Should be 0 in queries.other
- The other data field. Currently used only in BADTIME responses.- See Also:
-
TSIGRecord
public TSIGRecord(Name name, int dclass, long ttl, Name alg, Instant timeSigned, Duration fudge, byte[] signature, int originalID, int error, byte[] other) Creates a TSIG Record from the given data. This is normally called by the TSIG class- Parameters:
alg
- The shared key's algorithmtimeSigned
- The time that this record was generatedfudge
- The fudge factor for time - if the time that the message is received is not in the range [now - fudge, now + fudge], the signature failssignature
- The signatureoriginalID
- The message ID at the time of its generationerror
- The extended error field. Should be 0 in queries.other
- The other data field. Currently used only in BADTIME responses.- See Also:
-
-
Method Details
-
rrFromWire
Description copied from class:Record
Converts the type-specific RR to wire format - must be overridden- Specified by:
rrFromWire
in classRecord
- Throws:
IOException
-
rdataFromString
Description copied from class:Record
Converts the text format of an RR to the internal format - must be overriden- Specified by:
rdataFromString
in classRecord
- Throws:
IOException
-
rrToString
Converts rdata to a String- Specified by:
rrToString
in classRecord
-
getAlgorithm
Returns the shared key's algorithm -
getTimeSigned
Returns the time that this record was generated -
getFudge
Returns the time fudge factor -
getSignature
public byte[] getSignature()Returns the signature -
getOriginalID
public int getOriginalID()Returns the original message ID -
getError
public int getError()Returns the extended error -
getOther
public byte[] getOther()Returns the other data -
rrToWire
Description copied from class:Record
Converts the type-specific RR to wire format - must be overridden.
-
TSIGRecord(Name, int, long, Name, Instant, Duration, byte[], int, int, byte[])