Top Description Methods
org.bouncycastle.openpgp.operator

public Interface PGPDigestCalculator

Known Direct Implementers
org.bouncycastle.openpgp.operator.bc.SHA1PGPDigestCalculator, org.bouncycastle.openpgp.operator.jcajce.SHA1PGPDigestCalculator
Imports
java.io.OutputStream, org.bouncycastle.bcpg.HashAlgorithmTags

A digest calculator, which consumes a stream of data and computes a digest value over it.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the hash algorithm number
getAlgorithm
()

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

public byte[]

Returns:

a digest.
getDigest
()

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

public OutputStream

Returns:

an OutputStream that data to be digested can be written to.
getOutputStream
()

Returns a stream that will accept data for the purpose of calculating a digest.

public void
reset()

Reset the underlying digest calculator

Method Detail

getAlgorithmback to summary
public int getAlgorithm()

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

Returns:int

the hash algorithm number

getDigestback to summary
public byte[] getDigest()

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

Returns:byte[]

a digest.

getOutputStreamback to summary
public 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:OutputStream

an OutputStream that data to be digested can be written to.

resetback to summary
public void reset()

Reset the underlying digest calculator