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

org.bouncycastle.crypto.digests

## Class SHAKEDigest

- java.lang.Object
- - org.bouncycastle.crypto.digests.KeccakDigest
  - - org.bouncycastle.crypto.digests.SHAKEDigest

- All Implemented Interfaces:
    Digest, ExtendedDigest, Xof

      public class SHAKEDigest
      extends KeccakDigest
      implements Xof

  implementation of SHAKE based on following KeccakNISTInterface.c from http://keccak.noekeon.org/

  Following the naming conventions used in the C source code to enable easy review of the implementation.

- - ### Field Summary

    - ### Fields inherited from class org.bouncycastle.crypto.digests.KeccakDigest

      `bitsAvailableForSqueezing, bitsInQueue, chunk, dataQueue, fixedOutputLength, oneByte, rate, squeezing, state`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SHAKEDigest()`
    `SHAKEDigest(int bitLength)`
    `SHAKEDigest(SHAKEDigest source)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `doFinal(byte[] out, int outOff)` close the digest, producing the final digest value.
    `protected int` | `doFinal(byte[] out, int outOff, byte partialByte, int partialBits)`
    `int` | `doFinal(byte[] out, int outOff, int outLen)` Output the results of the final calculation for this digest to outLen number of bytes.
    `protected int` | `doFinal(byte[] out, int outOff, int outLen, byte partialByte, int partialBits)`
    `java.lang.String` | `getAlgorithmName()` return the algorithm name

    - ### Methods inherited from class org.bouncycastle.crypto.digests.KeccakDigest

      `absorb, getByteLength, getDigestSize, reset, squeeze, update, update`

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

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

    - ### Methods inherited from interface org.bouncycastle.crypto.ExtendedDigest

      `getByteLength`

    - ### Methods inherited from interface org.bouncycastle.crypto.Digest

      `getDigestSize, reset, update, update`

- - ### Constructor Detail

    - #### SHAKEDigest

          public SHAKEDigest()

    - #### SHAKEDigest

          public SHAKEDigest(int bitLength)

    - #### SHAKEDigest

          public SHAKEDigest(SHAKEDigest source)

  - ### Method Detail

    - #### getAlgorithmName

          public java.lang.String getAlgorithmName()

      Description copied from interface: `Digest`
      return the algorithm name
      Specified by:
        `getAlgorithmName` in interface `Digest`
      Overrides:
        `getAlgorithmName` in class `KeccakDigest`
      Returns:
        the algorithm name

    - #### doFinal

          public int doFinal(byte[] out,
                    int outOff)

      Description copied from interface: `Digest`
      close the digest, producing the final digest value. The doFinal call leaves the digest reset.
      Specified by:
        `doFinal` in interface `Digest`
      Overrides:
        `doFinal` in class `KeccakDigest`
      Parameters:
        `out` - the array the digest is to be copied into.
        `outOff` - the offset into the out array the digest is to start at.

    - #### doFinal

          public int doFinal(byte[] out,
                    int outOff,
                    int outLen)

      Description copied from interface: `Xof`
      Output the results of the final calculation for this digest to outLen number of bytes.
      Specified by:
        `doFinal` in interface `Xof`
      Parameters:
        `out` - output array to write the output bytes to.
        `outOff` - offset to start writing the bytes at.
        `outLen` - the number of output bytes requested.
      Returns:
        the number of bytes written

    - #### doFinal

          protected int doFinal(byte[] out,
                    int outOff,
                    byte partialByte,
                    int partialBits)

      Overrides:
        `doFinal` in class `KeccakDigest`

    - #### doFinal

          protected int doFinal(byte[] out,
                    int outOff,
                    int outLen,
                    byte partialByte,
                    int partialBits)