public interface

DigestCalculator

org.bouncycastle.operator.DigestCalculator

Class Overview

General interface for an operator that is able to calculate a digest from a stream of output.

Summary

Public Methods
abstract AlgorithmIdentifier getAlgorithmIdentifier()
Return the algorithm identifier representing the digest implemented by this calculator.
abstract byte[] getDigest()
Return the digest calculated on what has been written to the calculator's output stream.
abstract OutputStream getOutputStream()
Returns a stream that will accept data for the purpose of calculating a digest.

Public Methods

public abstract AlgorithmIdentifier getAlgorithmIdentifier ()

Return the algorithm identifier representing the digest implemented by this calculator.

Returns
  • algorithm id and parameters.

public abstract byte[] getDigest ()

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

Returns
  • a digest.

public abstract OutputStream getOutputStream ()

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

Returns
  • an OutputStream