Interface PGPDigestCalculator


public interface PGPDigestCalculator
A digest calculator, which consumes a stream of data and computes a digest value over it.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Return the algorithm number representing the digest implemented by this calculator.
    byte[]
    Return the digest calculated on what has been written to the calculator's output stream.
    Returns a stream that will accept data for the purpose of calculating a digest.
    void
    Reset the underlying digest calculator
  • Method Details

    • getAlgorithm

      int getAlgorithm()
      Return the algorithm number representing the digest implemented by this calculator.
      Returns:
      the hash algorithm number
    • getOutputStream

      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 that data to be digested can be written to.
    • getDigest

      byte[] getDigest()
      Return the digest calculated on what has been written to the calculator's output stream.
      Returns:
      a digest.
    • reset

      void reset()
      Reset the underlying digest calculator