DigitallySigned (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.crypto.tls

## Class DigitallySigned

- java.lang.Object
- - org.bouncycastle.crypto.tls.DigitallySigned

-     public class DigitallySigned
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SignatureAndHashAlgorithm` | `algorithm`
    `protected byte[]` | `signature`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DigitallySigned(SignatureAndHashAlgorithm algorithm, byte[] signature)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encode(java.io.OutputStream output)` Encode this `DigitallySigned` to an `OutputStream`.
    `SignatureAndHashAlgorithm` | `getAlgorithm()`
    `byte[]` | `getSignature()`
    `static DigitallySigned` | `parse(TlsContext context, java.io.InputStream input)` Parse a `DigitallySigned` from an `InputStream`.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### algorithm

          protected SignatureAndHashAlgorithm algorithm

    - #### signature

          protected byte[] signature

  - ### Constructor Detail

    - #### DigitallySigned

          public DigitallySigned(SignatureAndHashAlgorithm algorithm,
                         byte[] signature)

  - ### Method Detail

    - #### getAlgorithm

          public SignatureAndHashAlgorithm getAlgorithm()

      Returns:
        a `SignatureAndHashAlgorithm` (or null before TLS 1.2).

    - #### getSignature

          public byte[] getSignature()

    - #### encode

          public void encode(java.io.OutputStream output)
                      throws java.io.IOException

      Encode this `DigitallySigned` to an `OutputStream`.
      Parameters:
        `output` - the `OutputStream` to encode to.
      Throws:
        `java.io.IOException`

    - #### parse

          public static DigitallySigned parse(TlsContext context,
                              java.io.InputStream input)
                                       throws java.io.IOException

      Parse a `DigitallySigned` from an `InputStream`.
      Parameters:
        `context` - the `TlsContext` of the current connection.
        `input` - the `InputStream` to parse from.
      Returns:
        a `DigitallySigned` object.
      Throws:
        `java.io.IOException`