Top Description Methods
org.bouncycastle.crypto

public Interface OutputDigestCalculator<T>

extends Cloneable
Known Direct Implementers
org.bouncycastle.crypto.fips.FipsOutputDigestCalculator, org.bouncycastle.crypto.general.SecureHash.LocalOutputDigestCalculator
Type Parameters
<T>
the parameters type for the digest calculator.

Base interface for a digest calculator.

Method Summary

Modifier and TypeMethod and Description
public OutputDigestCalculator<T>

Returns:

a clone of the digest calculator.
clone
()

Return a clone of this calculator.

public byte[]

Returns:

a digest.
getDigest
()

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

public int

Returns:

the number of bytes written.
getDigest
(byte[]
output array to write the digest to.
output
,
int
offset to start writing the digest at..
off
)

Output the current digest value for what has been written to the calculator's output stream.

public int

Returns:

internal block size in bytes.
getDigestBlockSize
()

Return the size, in bytes, of the internal block used by the digest in this calculator.

public int

Returns:

digest length in bytes.
getDigestSize
()

Return the size of the digest produced by this calculator in bytes.

public UpdateOutputStream

Returns:

an OutputStream
getDigestStream
()

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

public T

Returns:

the digest calculator's parameters.
getParameters
()

Return the parameters for this digest calculator.

public void
reset()

Reset the calculator back to its initial state.

Method Detail

cloneback to summary
public OutputDigestCalculator<T> clone() throws CloneNotSupportedException

Return a clone of this calculator.

Returns:OutputDigestCalculator<T>

a clone of the digest calculator.

Exceptions
CloneNotSupportedException:
if cloning is not possible.
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.

getDigestback to summary
public int getDigest(byte[] output, int off)

Output the current digest value for what has been written to the calculator's output stream.

Parameters
output:byte[]

output array to write the digest to.

off:int

offset to start writing the digest at..

Returns:int

the number of bytes written.

getDigestBlockSizeback to summary
public int getDigestBlockSize()

Return the size, in bytes, of the internal block used by the digest in this calculator.

Returns:int

internal block size in bytes.

getDigestSizeback to summary
public int getDigestSize()

Return the size of the digest produced by this calculator in bytes.

Returns:int

digest length in bytes.

getDigestStreamback to summary
public UpdateOutputStream getDigestStream()

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:UpdateOutputStream

an OutputStream

getParametersback to summary
public T getParameters()

Return the parameters for this digest calculator.

Returns:T

the digest calculator's parameters.

resetback to summary
public void reset()

Reset the calculator back to its initial state.