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

org.xbill.DNS

## Class SIGRecord

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

- All Implemented Interfaces:
    Serializable, Cloneable, Comparable

      public class SIGRecord
      extends Record

  Signature - A SIG provides the digital signature of an RRset, so that the data can be authenticated by a DNSSEC-capable resolver. The signature is usually generated by a key contained in a KEYRecord
  Author:
    Brian Wellington
  See Also:
    `RRset`, `DNSSEC`, `KEYRecord`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `alg`
    `protected int` | `covered`
    `protected Date` | `expire`
    `protected int` | `footprint`
    `protected int` | `labels`
    `protected long` | `origttl`
    `protected byte[]` | `signature`
    `protected Name` | `signer`
    `protected Date` | `timeSigned`

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

      `dclass, name, ttl, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SIGRecord(Name name, int dclass, long ttl, int covered, int alg, long origttl, Date expire, Date timeSigned, int footprint, Name signer, byte[] signature)` Creates an SIG Record from the given data

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAlgorithm()` Returns the cryptographic algorithm of the key that generated the signature
    `Date` | `getExpire()` Returns the time at which the signature expires
    `int` | `getFootprint()` Returns The footprint/key id of the signing key.
    `int` | `getLabels()` Returns the number of labels in the signed domain name.
    `long` | `getOrigTTL()` Returns the original TTL of the RRset
    `byte[]` | `getSignature()` Returns the binary data representing the signature
    `Name` | `getSigner()` Returns the owner of the signing key
    `Date` | `getTimeSigned()` Returns the time at which this signature was generated
    `int` | `getTypeCovered()` Returns the RRset type covered by this signature

    - ### 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`

- - ### Field Detail

    - #### covered

          protected int covered

    - #### alg

          protected int alg

    - #### labels

          protected int labels

    - #### origttl

          protected long origttl

    - #### expire

          protected Date expire

    - #### timeSigned

          protected Date timeSigned

    - #### footprint

          protected int footprint

    - #### signer

          protected Name signer

    - #### signature

          protected byte[] signature

  - ### Constructor Detail

    - #### SIGRecord

          public SIGRecord(Name name,
                   int dclass,
                   long ttl,
                   int covered,
                   int alg,
                   long origttl,
                   Date expire,
                   Date timeSigned,
                   int footprint,
                   Name signer,
                   byte[] signature)

      Creates an SIG Record from the given data
      Parameters:
        `covered` - The RRset type covered by this signature
        `alg` - The cryptographic algorithm of the key that generated the signature
        `origttl` - The original TTL of the RRset
        `expire` - The time at which the signature expires
        `timeSigned` - The time at which this signature was generated
        `footprint` - The footprint/key id of the signing key.
        `signer` - The owner of the signing key
        `signature` - Binary data representing the signature

  - ### Method Detail

    - #### getTypeCovered

          public int getTypeCovered()

      Returns the RRset type covered by this signature

    - #### getAlgorithm

          public int getAlgorithm()

      Returns the cryptographic algorithm of the key that generated the signature

    - #### getLabels

          public int getLabels()

      Returns the number of labels in the signed domain name. This may be different than the record's domain name if the record is a wildcard record.

    - #### getOrigTTL

          public long getOrigTTL()

      Returns the original TTL of the RRset

    - #### getExpire

          public Date getExpire()

      Returns the time at which the signature expires

    - #### getTimeSigned

          public Date getTimeSigned()

      Returns the time at which this signature was generated

    - #### getFootprint

          public int getFootprint()

      Returns The footprint/key id of the signing key.

    - #### getSigner

          public Name getSigner()

      Returns the owner of the signing key

    - #### getSignature

          public byte[] getSignature()

      Returns the binary data representing the signature