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 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
getFunctionStream()
Returns a stream that will accept data for the purpose of calculating a MAC.abstract T
getParameters()
Return the parameters for this MAC calculator.abstract void
reset()
Reset the calculator back to its initial state.
-
-
-
Method Detail
-
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
public abstract T getParameters()
Description copied from interface:OutputXOFCalculator
Return the parameters for this MAC calculator.- Specified by:
getParameters
in interfaceOutputXOFCalculator<T extends FipsParameters>
- Returns:
- the MAC 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 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>
-
-