Package org.bouncycastle.tsp.ers
Class ERSCachingData
java.lang.Object
org.bouncycastle.tsp.ers.ERSCachingData
- All Implemented Interfaces:
ERSData
- Direct Known Subclasses:
ERSByteData
,ERSDataGroup
,ERSFileData
,ERSInputStreamData
An ERSData object that caches hash calculations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract byte[]
calculateHash
(DigestCalculator digestCalculator, byte[] previousChainHash) byte[]
getHash
(DigestCalculator digestCalculator, byte[] previousChainHash) Generates a hash for the whole DataGroup.
-
Constructor Details
-
ERSCachingData
public ERSCachingData()
-
-
Method Details
-
getHash
Generates a hash for the whole DataGroup.- Specified by:
getHash
in interfaceERSData
- Parameters:
digestCalculator
- theDigestCalculator
to use for computing the hashpreviousChainHash
- hash from an earlier chain if it needs to be included.- Returns:
- a hash that is representative of the whole DataGroup
-
calculateHash
protected abstract byte[] calculateHash(DigestCalculator digestCalculator, byte[] previousChainHash)
-