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
public abstract class ERSCachingData extends java.lang.Object implements ERSData
An ERSData object that caches hash calculations.
-
-
Constructor Summary
Constructors Constructor Description ERSCachingData()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract byte[]calculateHash(DigestCalculator digestCalculator, byte[] previousChainHash)byte[]getHash(DigestCalculator digestCalculator, byte[] previousChainHash)Generates a hash for the whole DataGroup.
-
-
-
Method Detail
-
getHash
public byte[] getHash(DigestCalculator digestCalculator, byte[] previousChainHash)
Generates a hash for the whole DataGroup.- Specified by:
getHashin interfaceERSData- Parameters:
digestCalculator- theDigestCalculatorto 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)
-
-