TSIGRecord (dnsjava documentation)
Date: 2013-04-10

org.xbill.DNS

## Class TSIGRecord

- java.lang.Object
- - org.xbill.DNS.Record
  - - org.xbill.DNS.TSIGRecord

- All Implemented Interfaces:
    Serializable, Cloneable, Comparable

      public class TSIGRecord
      extends 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:
    `Resolver`, `TSIG`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.xbill.DNS.Record

      `dclass, name, ttl, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `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.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Name` | `getAlgorithm()` Returns the shared key's algorithm
    `int` | `getError()` Returns the extended error
    `int` | `getFudge()` Returns the time fudge factor
    `int` | `getOriginalID()` Returns the original message ID
    `byte[]` | `getOther()` Returns the other data
    `byte[]` | `getSignature()` Returns the signature
    `Date` | `getTimeSigned()` Returns the time that this record was generated

    - ### 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, toString, toWire, toWireCanonical, unknownToString, withName`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TSIGRecord

          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 algorithm
        `timeSigned` - The time that this record was generated
        `fudge` - The fudge factor for time - if the time that the message is received is not in the range [now - fudge, now + fudge], the signature fails
        `signature` - The signature
        `originalID` - The message ID at the time of its generation
        `error` - The extended error field. Should be 0 in queries.
        `other` - The other data field. Currently used only in BADTIME responses.
      See Also:
        `TSIG`

  - ### Method Detail

    - #### getAlgorithm

          public Name getAlgorithm()

      Returns the shared key's algorithm

    - #### getTimeSigned

          public Date getTimeSigned()

      Returns the time that this record was generated

    - #### getFudge

          public int 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