Top Description Methods
org.bouncycastle.crypto

public Interface OutputMACCalculator<T>

Known Direct Implementers
org.bouncycastle.crypto.fips.FipsOutputMACCalculator
Type Parameters
<T>
the parameters type for the MAC calculator.

Base interface for a MAC calculator.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

a MAC.
getMAC
()

Return the MAC calculated on what has been written to the calculator's output stream.

public int

Returns:

the number of bytes written
getMAC
(byte[]
output array to write the MAC to.
output
,
int
offset to start writing the MAC at.
off
)

Output the current MAC value for what has been written to the calculator's output stream.

public int

Returns:

MAC length in bytes.
getMACSize
()

Return the size of the MAC produced by this calculator in bytes.

public UpdateOutputStream

Returns:

an UpdateOutputStream
getMACStream
()

Returns a stream that will accept data for the purpose of calculating a MAC.

public T

Returns:

the MAC calculator's parameters.
getParameters
()

Return the parameters for this MAC calculator.

public void
reset()

Reset the calculator back to its initial state.

Method Detail

getMACback to summary
public byte[] getMAC()

Return the MAC calculated on what has been written to the calculator's output stream.

Returns:byte[]

a MAC.

getMACback to summary
public int getMAC(byte[] output, int off)

Output the current MAC value for what has been written to the calculator's output stream.

Parameters
output:byte[]

output array to write the MAC to.

off:int

offset to start writing the MAC at.

Returns:int

the number of bytes written

getMACSizeback to summary
public int getMACSize()

Return the size of the MAC produced by this calculator in bytes.

Returns:int

MAC length in bytes.

getMACStreamback to summary
public UpdateOutputStream getMACStream()

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:UpdateOutputStream

an UpdateOutputStream

getParametersback to summary
public T getParameters()

Return the parameters for this MAC calculator.

Returns:T

the MAC calculator's parameters.

resetback to summary
public void reset()

Reset the calculator back to its initial state.