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 Object
implements OutputXOFCalculator<T>
Base class for a FIPS extendable output function calculator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
getFunctionOutput
(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 UpdateOutputStream
Returns a stream that will accept data for the purpose of calculating a MAC.abstract T
Return the parameters for this XOF calculator.abstract void
reset()
Reset the calculator back to its initial state.
-
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 interfaceOutputXOFCalculator<T extends FipsParameters>
- Parameters:
outLen
- the number of output bytes requested.- Returns:
- a byte array containing outLen bytes of output.
-
getParameters
Description copied from interface:OutputXOFCalculator
Return the parameters for this XOF calculator.- Specified by:
getParameters
in interfaceOutputXOFCalculator<T extends FipsParameters>
- Returns:
- the XOF calculator's parameters.
-
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 interfaceOutputXOFCalculator<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 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:OutputXOFCalculator
Reset the calculator back to its initial state.- Specified by:
reset
in interfaceOutputXOFCalculator<T extends FipsParameters>
-