Interface MacCalculator


public interface MacCalculator
General interface for a key initialized operator that is able to calculate a MAC from a stream of output.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bouncycastle.asn1.x509.AlgorithmIdentifier
     
    Return the key used for calculating the MAC.
    byte[]
    Return the calculated MAC based on what has been written to the stream.
    Returns a stream that will accept data for the purpose of calculating the MAC for later verification.
  • Method Details

    • getAlgorithmIdentifier

      org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
    • getOutputStream

      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

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

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