Class FipsOutputXOFCalculator<T extends FipsParameters>

java.lang.Object
org.bouncycastle.crypto.fips.FipsOutputXOFCalculator<T>
Type Parameters:
T - The parameters class for this verifier.
All Implemented Interfaces:
OutputXOFCalculator<T>

public abstract class FipsOutputXOFCalculator<T extends FipsParameters> extends Object implements OutputXOFCalculator<T>
Base class for a FIPS extendable output function calculator.
  • Constructor Details

    • FipsOutputXOFCalculator

      public FipsOutputXOFCalculator()
  • Method Details

    • getFunctionOutput

      public byte[] getFunctionOutput(int outLen)
      Description copied from interface: OutputXOFCalculator
      Return the outLen bytes of function output for what has been written to the calculator's output stream.
      Specified by:
      getFunctionOutput in interface OutputXOFCalculator<T extends FipsParameters>
      Parameters:
      outLen - the number of output bytes requested.
      Returns:
      a byte array containing outLen bytes of output.
    • getParameters

      public abstract T getParameters()
      Description copied from interface: OutputXOFCalculator
      Return the parameters for this XOF calculator.
      Specified by:
      getParameters in interface OutputXOFCalculator<T extends FipsParameters>
      Returns:
      the XOF calculator's parameters.
    • getFunctionStream

      public abstract UpdateOutputStream getFunctionStream()
      Description copied from interface: OutputXOFCalculator
      Returns a stream that will accept data for the purpose of calculating a MAC. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.
      Specified by:
      getFunctionStream in interface OutputXOFCalculator<T extends FipsParameters>
      Returns:
      an UpdateOutputStream
    • getFunctionOutput

      public abstract int getFunctionOutput(byte[] output, int off, int outLen)
      Description copied from interface: OutputXOFCalculator
      Output the function output for what has been written to the calculator's output stream.
      Specified by:
      getFunctionOutput in interface OutputXOFCalculator<T extends FipsParameters>
      Parameters:
      output - output array to write the output bytes to.
      off - offset to start writing the bytes at.
      outLen - the number of output bytes requested.
      Returns:
      the number of bytes written
    • reset

      public abstract void reset()
      Description copied from interface: OutputXOFCalculator
      Reset the calculator back to its initial state.
      Specified by:
      reset in interface OutputXOFCalculator<T extends FipsParameters>