Bouncy Castle Cryptography Library 1.59

org.bouncycastle.operator
Interface MacCalculator


public interface MacCalculator


Method Summary
 org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
           
 GenericKey getKey()
          Return the key used for calculating the MAC.
 byte[] getMac()
          Return the calculated MAC based on what has been written to the stream.
 java.io.OutputStream getOutputStream()
          Returns a stream that will accept data for the purpose of calculating the MAC for later verification.
 

Method Detail

getAlgorithmIdentifier

public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()

getOutputStream

public java.io.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:
an OutputStream

getMac

public byte[] getMac()
Return the calculated MAC based on what has been written to the stream.
Returns:
calculated MAC.

getKey

public GenericKey getKey()
Return the key used for calculating the MAC.
Returns:
the MAC key.

Bouncy Castle Cryptography Library 1.59