Bouncy Castle Cryptography Library 1.79

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
ERSCachingData()
           
 
Method Summary
protected abstract  byte[] calculateHash(DigestCalculator digestCalculator, byte[] previousChainHash)
           
 byte[] getHash(DigestCalculator digestCalculator, byte[] previousChainHash)
          Generates a hash for the whole DataGroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERSCachingData

public ERSCachingData()
Method Detail

getHash

public byte[] getHash(DigestCalculator digestCalculator,
                      byte[] previousChainHash)
Generates a hash for the whole DataGroup.
Specified by:
getHash in interface ERSData
Parameters:
digestCalculator - the DigestCalculator to use for computing the hash
Returns:
a hash that is representative of the whole DataGroup

calculateHash

protected abstract byte[] calculateHash(DigestCalculator digestCalculator,
                                        byte[] previousChainHash)

Bouncy Castle Cryptography Library 1.79