org.minidns.record

## Class RRSIG

- java.lang.Object
- - org.minidns.record.Data
  - - org.minidns.record.RRSIG

-     public class RRSIG
      extends Data

  DNS RRSIG (Resource Record Signature) record payload for DNSSEC.
  Contains cryptographic signature covering a set of DNS records to provide authenticity and integrity verification.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `DnssecConstants.SignatureAlgorithm` | `algorithm` The cryptographic algorithm used to create the signature.
    `byte` | `algorithmByte` The cryptographic algorithm used to create the signature.
    `int` | `keyTag` The key tag value of the DNSKEY RR that validates this signature.
    `byte` | `labels` The number of labels in the original RRSIG RR owner name.
    `long` | `originalTtl` The TTL of the covered RRset.
    `Date` | `signatureExpiration` The date and time this RRSIG records expires.
    `Date` | `signatureInception` The date and time this RRSIG records starts to be valid.
    `DnsName` | `signerName` The owner name of the DNSKEY RR that a validator is supposed to use.
    `Record.TYPE` | `typeCovered` The type of RRset covered by this signature.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RRSIG(Record.TYPE typeCovered, DnssecConstants.SignatureAlgorithm algorithm, byte labels, long originalTtl, Date signatureExpiration, Date signatureInception, int keyTag, DnsName signerName, byte[] signature)`
    `RRSIG(Record.TYPE typeCovered, DnssecConstants.SignatureAlgorithm algorithm, byte labels, long originalTtl, Date signatureExpiration, Date signatureInception, int keyTag, String signerName, byte[] signature)`
    `RRSIG(Record.TYPE typeCovered, int algorithm, byte labels, long originalTtl, Date signatureExpiration, Date signatureInception, int keyTag, DnsName signerName, byte[] signature)`
    `RRSIG(Record.TYPE typeCovered, int algorithm, byte labels, long originalTtl, Date signatureExpiration, Date signatureInception, int keyTag, String signerName, byte[] signature)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getSignature()`
    `DataInputStream` | `getSignatureAsDataInputStream()`
    `String` | `getSignatureBase64()`
    `int` | `getSignatureLength()`
    `Record.TYPE` | `getType()` The payload type.
    `static RRSIG` | `parse(DataInputStream dis, byte[] data, int length)`
    `void` | `serialize(DataOutputStream dos)` The internal method used to serialize Data subclasses.
    `String` | `toString()`
    `void` | `writePartialSignature(DataOutputStream dos)`

    - ### Methods inherited from class org.minidns.record.Data

      `equals, hashCode, length, toByteArray, toOutputStream, toOutputStream`

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

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

- - ### Field Detail

    - #### algorithm

          public final DnssecConstants.SignatureAlgorithm algorithm

      The cryptographic algorithm used to create the signature.

    - #### algorithmByte

          public final byte algorithmByte

      The cryptographic algorithm used to create the signature.

    - #### keyTag

          public final int keyTag

      The key tag value of the DNSKEY RR that validates this signature.

    - #### labels

          public final byte labels

      The number of labels in the original RRSIG RR owner name.

    - #### originalTtl

          public final long originalTtl

      The TTL of the covered RRset.

    - #### signatureExpiration

          public final Date signatureExpiration

      The date and time this RRSIG records expires.

    - #### signatureInception

          public final Date signatureInception

      The date and time this RRSIG records starts to be valid.

    - #### signerName

          public final DnsName signerName

      The owner name of the DNSKEY RR that a validator is supposed to use.

    - #### typeCovered

          public final Record.TYPE typeCovered

      The type of RRset covered by this signature.

  - ### Constructor Detail

    - #### RRSIG

          public RRSIG(Record.TYPE typeCovered,
                       DnssecConstants.SignatureAlgorithm algorithm,
                       byte labels,
                       long originalTtl,
                       Date signatureExpiration,
                       Date signatureInception,
                       int keyTag,
                       DnsName signerName,
                       byte[] signature)

    - #### RRSIG

          public RRSIG(Record.TYPE typeCovered,
                       DnssecConstants.SignatureAlgorithm algorithm,
                       byte labels,
                       long originalTtl,
                       Date signatureExpiration,
                       Date signatureInception,
                       int keyTag,
                       String signerName,
                       byte[] signature)

    - #### RRSIG

          public RRSIG(Record.TYPE typeCovered,
                       int algorithm,
                       byte labels,
                       long originalTtl,
                       Date signatureExpiration,
                       Date signatureInception,
                       int keyTag,
                       DnsName signerName,
                       byte[] signature)

    - #### RRSIG

          public RRSIG(Record.TYPE typeCovered,
                       int algorithm,
                       byte labels,
                       long originalTtl,
                       Date signatureExpiration,
                       Date signatureInception,
                       int keyTag,
                       String signerName,
                       byte[] signature)

  - ### Method Detail

    - #### getSignature

          public byte[] getSignature()

    - #### getSignatureAsDataInputStream

          public DataInputStream getSignatureAsDataInputStream()

    - #### getSignatureBase64

          public String getSignatureBase64()

    - #### getSignatureLength

          public int getSignatureLength()

    - #### getType

          public Record.TYPE getType()

      Description copied from class: `Data`
      The payload type.
      Specified by:
        `getType` in class `Data`
      Returns:
        The payload type.

    - #### parse

          public static RRSIG parse(DataInputStream dis,
                                    byte[] data,
                                    int length)
                             throws IOException

      Throws:
        `IOException`

    - #### serialize

          public void serialize(DataOutputStream dos)
                         throws IOException

      Description copied from class: `Data`
      The internal method used to serialize Data subclasses.
      Specified by:
        `serialize` in class `Data`
      Parameters:
        `dos` - the output stream to serialize to.
      Throws:
        `IOException` - if an I/O error occurs.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### writePartialSignature

          public void writePartialSignature(DataOutputStream dos)
                                     throws IOException

      Throws:
        `IOException`