org.minidns.record

## Class DelegatingDnssecRR

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

- Direct Known Subclasses:
    DLV, DS

      public abstract class DelegatingDnssecRR
      extends Data

  Abstract base class for DNSSEC delegation records.
  Provides common functionality for DNSSEC records that delegate trust from parent zones to child zones.
  See Also:
    RFC 4034 § 5

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `DelegatingDnssecRR.SharedData`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `DnssecConstants.SignatureAlgorithm` | `algorithm` The cryptographic algorithm used to create the signature.
    `byte` | `algorithmByte` The byte value of the cryptographic algorithm used to create the signature.
    `protected byte[]` | `digest` The digest build from a DNSKEY.
    `DnssecConstants.DigestAlgorithm` | `digestType` The algorithm used to construct the digest.
    `byte` | `digestTypeByte` The byte value of algorithm used to construct the digest.
    `int` | `keyTag` The key tag value of the DNSKEY RR that validates this signature.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DelegatingDnssecRR(int keyTag, byte algorithm, byte digestType, byte[] digest)`
    `protected` | `DelegatingDnssecRR(int keyTag, DnssecConstants.SignatureAlgorithm algorithm, byte digestType, byte[] digest)`
    `protected` | `DelegatingDnssecRR(int keyTag, DnssecConstants.SignatureAlgorithm algorithm, byte algorithmByte, DnssecConstants.DigestAlgorithm digestType, byte digestTypeByte, byte[] digest)`
    `protected` | `DelegatingDnssecRR(int keyTag, DnssecConstants.SignatureAlgorithm algorithm, DnssecConstants.DigestAlgorithm digestType, byte[] digest)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `digestEquals(byte[] otherDigest)`
    `BigInteger` | `getDigestBigInteger()`
    `String` | `getDigestHex()`
    `protected static DelegatingDnssecRR.SharedData` | `parseSharedData(DataInputStream dis, int length)`
    `void` | `serialize(DataOutputStream dos)` The internal method used to serialize Data subclasses.
    `String` | `toString()`

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

      `equals, getType, 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. If MiniDNS isn't aware of the signature algorithm, then this field will be `null`.
      See Also:
        `algorithmByte`

    - #### algorithmByte

          public final byte algorithmByte

      The byte value of the cryptographic algorithm used to create the signature.

    - #### digest

          protected final byte[] digest

      The digest build from a DNSKEY.

    - #### digestType

          public final DnssecConstants.DigestAlgorithm digestType

      The algorithm used to construct the digest. If MiniDNS isn't aware of the digest algorithm, then this field will be `null`.
      See Also:
        `digestTypeByte`

    - #### digestTypeByte

          public final byte digestTypeByte

      The byte value of algorithm used to construct the digest.

    - #### keyTag

          public final int keyTag

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

  - ### Constructor Detail

    - #### DelegatingDnssecRR

          protected DelegatingDnssecRR(int keyTag,
                                       byte algorithm,
                                       byte digestType,
                                       byte[] digest)

    - #### DelegatingDnssecRR

          protected DelegatingDnssecRR(int keyTag,
                                       DnssecConstants.SignatureAlgorithm algorithm,
                                       byte digestType,
                                       byte[] digest)

    - #### DelegatingDnssecRR

          protected DelegatingDnssecRR(int keyTag,
                                       DnssecConstants.SignatureAlgorithm algorithm,
                                       byte algorithmByte,
                                       DnssecConstants.DigestAlgorithm digestType,
                                       byte digestTypeByte,
                                       byte[] digest)

    - #### DelegatingDnssecRR

          protected DelegatingDnssecRR(int keyTag,
                                       DnssecConstants.SignatureAlgorithm algorithm,
                                       DnssecConstants.DigestAlgorithm digestType,
                                       byte[] digest)

  - ### Method Detail

    - #### digestEquals

          public boolean digestEquals(byte[] otherDigest)

    - #### getDigestBigInteger

          public BigInteger getDigestBigInteger()

    - #### getDigestHex

          public String getDigestHex()

    - #### parseSharedData

          protected static DelegatingDnssecRR.SharedData parseSharedData(DataInputStream dis,
                                                                         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`