Top Description Methods
org.bouncycastle.operator

public Interface MacCalculator

Known Direct Implementers
org.bouncycastle.cms.jcajce.JceCMSMacCalculatorBuilder.CMSMacCalculator
Imports
java.io.OutputStream, org.bouncycastle.asn1.x509.AlgorithmIdentifier

General interface for a key initialized operator that is able to calculate a MAC from a stream of output.

Method Summary

Modifier and TypeMethod and Description
public AlgorithmIdentifier
public GenericKey

Returns:

the MAC key.
getKey
()

Return the key used for calculating the MAC.

public byte[]

Returns:

calculated MAC.
getMac
()

Return the calculated MAC based on what has been written to the stream.

public OutputStream

Returns:

an OutputStream
getOutputStream
()

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

Method Detail

getAlgorithmIdentifierback to summary
public AlgorithmIdentifier getAlgorithmIdentifier()
getKeyback to summary
public GenericKey getKey()

Return the key used for calculating the MAC.

Returns:GenericKey

the MAC key.

getMacback to summary
public byte[] getMac()

Return the calculated MAC based on what has been written to the stream.

Returns:byte[]

calculated MAC.

getOutputStreamback to summary
public OutputStream getOutputStream()

Returns a stream that will accept data for the purpose of calculating the MAC for later verification. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.

Returns:OutputStream

an OutputStream