Package org.bouncycastle.crypto
Interface OutputXOFCalculator<T>
-
- Type Parameters:
T
- the parameters type for the XOF calculator.
- All Known Implementing Classes:
FipsOutputXOFCalculator
public interface OutputXOFCalculator<T>
Base interface for an eXtendable Output Funnction (XOF) calculator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.UpdateOutputStream
getFunctionStream()
Returns a stream that will accept data for the purpose of calculating a MAC.T
getParameters()
Return the parameters for this MAC calculator.void
reset()
Reset the calculator back to its initial state.
-
-
-
Method Detail
-
getParameters
T getParameters()
Return the parameters for this MAC calculator.- Returns:
- the MAC calculator's parameters.
-
getFunctionStream
UpdateOutputStream getFunctionStream()
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.- Returns:
- an UpdateOutputStream
-
getFunctionOutput
byte[] getFunctionOutput(int outLen)
Return the outLen bytes of function output for what has been written to the calculator's output stream.- Parameters:
outLen
- the number of output bytes requested.- Returns:
- a byte array containing outLen bytes of output.
-
getFunctionOutput
int getFunctionOutput(byte[] output, int off, int outLen)
Output the function output for what has been written to the calculator's output stream.- 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
void reset()
Reset the calculator back to its initial state.
-
-