Class AbstractDataObjectDigestBuilder
java.lang.Object
eu.europa.esig.dss.evidencerecord.common.digest.AbstractDataObjectDigestBuilder
- All Implemented Interfaces:
DataObjectDigestBuilder
- Direct Known Subclasses:
ASN1EvidenceRecordDataObjectDigestBuilder
,XMLEvidenceRecordDataObjectDigestBuilder
public abstract class AbstractDataObjectDigestBuilder
extends Object
implements DataObjectDigestBuilder
Abstract implementation of
DataObjectDigestBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprotected final DigestAlgorithm
The digest algorithm to be used on hash computationprotected final DSSDocument
Document to compute digest onprotected final InputStream
InputStream to compute digest on -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractDataObjectDigestBuilder
(byte[] binaries) Constructor to create a builder for computing digest on the given binaries using a SHA-256 digest algorithmprotected
AbstractDataObjectDigestBuilder
(byte[] binaries, DigestAlgorithm digestAlgorithm) Constructor to create a builder for computing digest on the given binaries using a provided digest algorithmprotected
AbstractDataObjectDigestBuilder
(DSSDocument document) Constructor to create a builder for computing digest on the given document using a SHA-256 digest algorithmprotected
AbstractDataObjectDigestBuilder
(DSSDocument document, DigestAlgorithm digestAlgorithm) Constructor to create a builder for computing digest on the given document using a provided digest algorithmprotected
AbstractDataObjectDigestBuilder
(InputStream inputStream) Constructor to create a builder for computing digest on the given InputStream using a SHA-256 digest algorithmprotected
AbstractDataObjectDigestBuilder
(InputStream inputStream, DigestAlgorithm digestAlgorithm) Constructor to create a builder for computing digest on the given InputStream using a provided digest algorithm -
Method Summary
-
Field Details
-
inputStream
InputStream to compute digest on -
document
Document to compute digest on -
digestAlgorithm
The digest algorithm to be used on hash computation
-
-
Constructor Details
-
AbstractDataObjectDigestBuilder
protected AbstractDataObjectDigestBuilder(byte[] binaries) Constructor to create a builder for computing digest on the given binaries using a SHA-256 digest algorithm- Parameters:
binaries
- byte array to compute hash on
-
AbstractDataObjectDigestBuilder
Constructor to create a builder for computing digest on the given InputStream using a SHA-256 digest algorithm- Parameters:
inputStream
-InputStream
to compute hash on
-
AbstractDataObjectDigestBuilder
Constructor to create a builder for computing digest on the given document using a SHA-256 digest algorithm- Parameters:
document
-DSSDocument
to compute hash on
-
AbstractDataObjectDigestBuilder
Constructor to create a builder for computing digest on the given binaries using a provided digest algorithm- Parameters:
binaries
- byte array to compute hash ondigestAlgorithm
-DigestAlgorithm
to be used on hash computation
-
AbstractDataObjectDigestBuilder
Constructor to create a builder for computing digest on the given InputStream using a provided digest algorithm- Parameters:
inputStream
-InputStream
to compute hash ondigestAlgorithm
-DigestAlgorithm
to be used on hash computation
-
AbstractDataObjectDigestBuilder
Constructor to create a builder for computing digest on the given document using a provided digest algorithm- Parameters:
document
-DSSDocument
to compute hash ondigestAlgorithm
-DigestAlgorithm
to be used on hash computation
-
-
Method Details
-
build
Description copied from interface:DataObjectDigestBuilder
Generates hash value- Specified by:
build
in interfaceDataObjectDigestBuilder
- Returns:
Digest
containing the hash value of the data object and the used digest algorithm
-