SignatureAndHashAlgorithm (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.crypto.tls

## Class SignatureAndHashAlgorithm

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

-     public class SignatureAndHashAlgorithm
      extends java.lang.Object

  RFC 5246 7.4.1.4.1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected short` | `hash`
    `protected short` | `signature`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SignatureAndHashAlgorithm(short hash, short signature)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encode(java.io.OutputStream output)` Encode this `SignatureAndHashAlgorithm` to an `OutputStream`.
    `boolean` | `equals(java.lang.Object obj)`
    `short` | `getHash()`
    `short` | `getSignature()`
    `int` | `hashCode()`
    `static SignatureAndHashAlgorithm` | `parse(java.io.InputStream input)` Parse a `SignatureAndHashAlgorithm` from an `InputStream`.

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

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

- - ### Field Detail

    - #### hash

          protected short hash

    - #### signature

          protected short signature

  - ### Constructor Detail

    - #### SignatureAndHashAlgorithm

          public SignatureAndHashAlgorithm(short hash,
                                   short signature)

      Parameters:
        `hash` - `HashAlgorithm`
        `signature` - `SignatureAlgorithm`

  - ### Method Detail

    - #### getHash

          public short getHash()

      Returns:
        `HashAlgorithm`

    - #### getSignature

          public short getSignature()

      Returns:
        `SignatureAlgorithm`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### encode

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

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

    - #### parse

          public static SignatureAndHashAlgorithm parse(java.io.InputStream input)
                                                 throws java.io.IOException

      Parse a `SignatureAndHashAlgorithm` from an `InputStream`.
      Parameters:
        `input` - the `InputStream` to parse from.
      Returns:
        a `SignatureAndHashAlgorithm` object.
      Throws:
        `java.io.IOException`