Package org.bouncycastle.crypto.fips
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 java.lang.Object implements OutputXOFCalculator<T>
Base class for a FIPS extendable output function calculator.
-
-
Constructor Summary
Constructors Constructor Description FipsOutputXOFCalculator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intgetFunctionOutput(byte[] output, int off, int outLen)Output the function output for what has been written to the calculator's output stream.byte[]getFunctionOutput(int outLen)Return the outLen bytes of function output for what has been written to the calculator's output stream.abstract UpdateOutputStreamgetFunctionStream()Returns a stream that will accept data for the purpose of calculating a MAC.abstract TgetParameters()Return the parameters for this MAC calculator.abstract voidreset()Reset the calculator back to its initial state.
-
-
-
Method Detail
-
getFunctionOutput
public byte[] getFunctionOutput(int outLen)
Description copied from interface:OutputXOFCalculatorReturn the outLen bytes of function output for what has been written to the calculator's output stream.- Specified by:
getFunctionOutputin interfaceOutputXOFCalculator<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:OutputXOFCalculatorReturn the parameters for this MAC calculator.- Specified by:
getParametersin interfaceOutputXOFCalculator<T extends FipsParameters>- Returns:
- the MAC calculator's parameters.
-
getFunctionStream
public abstract UpdateOutputStream getFunctionStream()
Description copied from interface:OutputXOFCalculatorReturns 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:
getFunctionStreamin interfaceOutputXOFCalculator<T extends FipsParameters>- Returns:
- an UpdateOutputStream
-
getFunctionOutput
public abstract int getFunctionOutput(byte[] output, int off, int outLen)Description copied from interface:OutputXOFCalculatorOutput the function output for what has been written to the calculator's output stream.- Specified by:
getFunctionOutputin interfaceOutputXOFCalculator<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:OutputXOFCalculatorReset the calculator back to its initial state.- Specified by:
resetin interfaceOutputXOFCalculator<T extends FipsParameters>
-
-