public class TruncatingDigestCalculator extends java.lang.Object implements DigestCalculator
| Constructor and Description |
|---|
TruncatingDigestCalculator(DigestCalculator baseCalculator)
Default constructor - truncate to 28.
|
TruncatingDigestCalculator(DigestCalculator baseCalculator,
int length)
Constructor specifying a length.
|
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getAlgorithmIdentifier()
Return the algorithm identifier representing the digest implemented by
this calculator.
|
byte[] |
getDigest()
Return the digest calculated on what has been written to the calculator's output stream.
|
java.io.OutputStream |
getOutputStream()
Returns a stream that will accept data for the purpose of calculating
a digest.
|
public TruncatingDigestCalculator(DigestCalculator baseCalculator)
baseCalculator - actual calculator for working out the digest.public TruncatingDigestCalculator(DigestCalculator baseCalculator, int length)
baseCalculator - actual calculator for working out the digest.length - length in bytes of the final result.public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
DigestCalculatorgetAlgorithmIdentifier in interface DigestCalculatorpublic java.io.OutputStream getOutputStream()
DigestCalculatorgetOutputStream in interface DigestCalculatorpublic byte[] getDigest()
DigestCalculatorgetDigest in interface DigestCalculator