org.xbill.DNS
Class KEYRecord

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

public class KEYRecord
extends Record

Key - contains a cryptographic public key. The data can be converted to objects implementing java.security.interfaces.PublicKey

See Also:
DNSSEC

Field Summary
static int FLAG_NOAUTH
          This key cannot be used for authentication
static int FLAG_NOCONF
          This key cannot be used for confidentiality (encryption)
static int FLAG_NOKEY
          This key cannot be used for authentication or confidentiality
static int OWNER_HOST
          A host/end entity key
static int OWNER_USER
          A user key
static int OWNER_ZONE
          A zone key
static int PROTOCOL_ANY
          Key was created for use with any protocol
static int PROTOCOL_DNSSEC
          Key was created for use with DNSSEC
static int PROTOCOL_EMAIL
          Key was created for use with email
static int PROTOCOL_IPSEC
          Key was created for use with IPSEC
static int PROTOCOL_TLS
          Key was created for use with transaction level security
 
Fields inherited from class org.xbill.DNS.Record
dclass, name, ttl, type, wireLength
 
Constructor Summary
KEYRecord(Name _name, short _dclass, int _ttl, int _flags, int _proto, int _alg, byte[] _key)
          Creates a KEY Record from the given data
 
Method Summary
 byte getAlgorithm()
          Returns the key's algorithm
 short getFlags()
          Returns the flags describing the key's properties
 short getFootprint()
          Returns the key's footprint (after computing it)
 byte[] getKey()
          Returns the binary data representing the key
 byte getProtocol()
          Returns the protocol that the key was created for
 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

FLAG_NOCONF

public static final int FLAG_NOCONF
This key cannot be used for confidentiality (encryption)

FLAG_NOAUTH

public static final int FLAG_NOAUTH
This key cannot be used for authentication

FLAG_NOKEY

public static final int FLAG_NOKEY
This key cannot be used for authentication or confidentiality

OWNER_ZONE

public static final int OWNER_ZONE
A zone key

OWNER_HOST

public static final int OWNER_HOST
A host/end entity key

OWNER_USER

public static final int OWNER_USER
A user key

PROTOCOL_TLS

public static final int PROTOCOL_TLS
Key was created for use with transaction level security

PROTOCOL_EMAIL

public static final int PROTOCOL_EMAIL
Key was created for use with email

PROTOCOL_DNSSEC

public static final int PROTOCOL_DNSSEC
Key was created for use with DNSSEC

PROTOCOL_IPSEC

public static final int PROTOCOL_IPSEC
Key was created for use with IPSEC

PROTOCOL_ANY

public static final int PROTOCOL_ANY
Key was created for use with any protocol
Constructor Detail

KEYRecord

public KEYRecord(Name _name,
                 short _dclass,
                 int _ttl,
                 int _flags,
                 int _proto,
                 int _alg,
                 byte[] _key)
Creates a KEY Record from the given data
Parameters:
flags - Flags describing the key's properties
proto - The protocol that the key was created for
alg - The key's algorithm
key - Binary data representing the key
Method Detail

toString

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

getFlags

public short getFlags()
Returns the flags describing the key's properties

getProtocol

public byte getProtocol()
Returns the protocol that the key was created for

getAlgorithm

public byte getAlgorithm()
Returns the key's algorithm

getKey

public byte[] getKey()
Returns the binary data representing the key

getFootprint

public short getFootprint()
Returns the key's footprint (after computing it)