public class TruncatingDigestCalculator extends 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 |
---|---|
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.
|
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 AlgorithmIdentifier getAlgorithmIdentifier()
DigestCalculator
getAlgorithmIdentifier
in interface DigestCalculator
public OutputStream getOutputStream()
DigestCalculator
getOutputStream
in interface DigestCalculator
public byte[] getDigest()
DigestCalculator
getDigest
in interface DigestCalculator
Copyright © 2021 BouncyCastle.org. All rights reserved.