org.xbill.DNS
Class TKEYRecord

java.lang.Object
  |
  +--org.xbill.DNS.Record
        |
        +--org.xbill.DNS.TKEYRecord

public class TKEYRecord
extends Record

Transaction Key - used to compute and/or securely transport a shared secret to be used with TSIG.

See Also:
TSIG

Field Summary
static short DELETE
          The key should be deleted
static short DIFFIEHELLMAN
          The key is computed using a Diffie-Hellman key exchange
static short GSSAPI
          The key is computed using GSS_API (unimplemented)
static short RESOLVERASSIGNED
          The key is assigned by the resolver (unimplemented)
static short SERVERASSIGNED
          The key is assigned by the server (unimplemented)
 
Fields inherited from class org.xbill.DNS.Record
dclass, name, ttl, type, wireLength
 
Constructor Summary
TKEYRecord(Name _name, short _dclass, int _ttl, Name _alg, Date _timeInception, Date _timeExpire, short _mode, short _error, byte[] _key, byte[] _other)
          Creates a TKEY Record from the given data.
 
Method Summary
 Name getAlgorithm()
          Returns the shared key's algorithm
 short getError()
          Returns the extended error
 byte[] getKey()
          Returns the shared secret or keying material
 short getMode()
          Returns the key agreement mode
 byte[] getOther()
          Returns the other data
 Date getTimeExpire()
          Returns the end of the validity period of the shared secret or keying material
 Date getTimeInception()
          Returns the beginning of the validity period of the shared secret or keying material
protected  String modeString()
           
 String toString()
          Converts to a String
 
Methods inherited from class org.xbill.DNS.Record
equals, fromString, fromWire, getDClass, getName, getRRsetType, getTTL, getType, getWireLength, hashCode, newRecord, newRecord, newRecord, toWire, toWireCanonical, withName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVERASSIGNED

public static final short SERVERASSIGNED
The key is assigned by the server (unimplemented)

DIFFIEHELLMAN

public static final short DIFFIEHELLMAN
The key is computed using a Diffie-Hellman key exchange

GSSAPI

public static final short GSSAPI
The key is computed using GSS_API (unimplemented)

RESOLVERASSIGNED

public static final short RESOLVERASSIGNED
The key is assigned by the resolver (unimplemented)

DELETE

public static final short DELETE
The key should be deleted
Constructor Detail

TKEYRecord

public TKEYRecord(Name _name,
                  short _dclass,
                  int _ttl,
                  Name _alg,
                  Date _timeInception,
                  Date _timeExpire,
                  short _mode,
                  short _error,
                  byte[] _key,
                  byte[] _other)
           throws IOException
Creates a TKEY Record from the given data.
Parameters:
alg - The shared key's algorithm
timeInception - The beginning of the validity period of the shared secret or keying material
timeExpire - The end of the validity period of the shared secret or keying material
mode - The mode of key agreement
error - The extended error field. Should be 0 in queries
key - The shared secret
other - The other data field. Currently unused responses.
Method Detail

modeString

protected String modeString()

toString

public String toString()
Converts to a String
Overrides:
toString in class Record

getAlgorithm

public Name getAlgorithm()
Returns the shared key's algorithm

getTimeInception

public Date getTimeInception()
Returns the beginning of the validity period of the shared secret or keying material

getTimeExpire

public Date getTimeExpire()
Returns the end of the validity period of the shared secret or keying material

getMode

public short getMode()
Returns the key agreement mode

getError

public short getError()
Returns the extended error

getKey

public byte[] getKey()
Returns the shared secret or keying material

getOther

public byte[] getOther()
Returns the other data