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()
DigestCalculatorgetAlgorithmIdentifier in interface DigestCalculatorpublic OutputStream getOutputStream()
DigestCalculatorgetOutputStream in interface DigestCalculatorpublic byte[] getDigest()
DigestCalculatorgetDigest in interface DigestCalculatorCopyright © 2015–2019 The veraPDF Consortium. All rights reserved.