public class ERSArchiveTimeStampGenerator
extends java.lang.Object
ERSArchiveTimeStamps carrying the reduced hash tree for each object.| Constructor and Description |
|---|
ERSArchiveTimeStampGenerator(DigestCalculator digCalc) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllData(java.util.List<ERSData> dataObjects)
Add a list of data objects (or data groups) to be covered by the archive time-stamp.
|
void |
addData(ERSData dataObject)
Add a data object (or data group) to be covered by the archive time-stamp.
|
ERSArchiveTimeStamp |
generateArchiveTimeStamp(TimeStampResponse tspResponse)
Generate a single ArchiveTimeStamp from the passed in time-stamp response.
|
java.util.List<ERSArchiveTimeStamp> |
generateArchiveTimeStamps(TimeStampResponse tspResponse)
Generate one ArchiveTimeStamp per added data object from the passed in
time-stamp response, each carrying the reduced hash tree (the sibling path
through the Merkle tree) needed to recover the time-stamped root for that object.
|
TimeStampRequest |
generateTimeStampRequest(TimeStampRequestGenerator tspReqGenerator)
Generate a time-stamp request for the root hash of the Merkle tree built over
the data objects added so far.
|
TimeStampRequest |
generateTimeStampRequest(TimeStampRequestGenerator tspReqGenerator,
java.math.BigInteger nonce)
Generate a time-stamp request for the root hash with the passed in nonce.
|
public ERSArchiveTimeStampGenerator(DigestCalculator digCalc)
public void addData(ERSData dataObject)
dataObject - the data object/group to add.public void addAllData(java.util.List<ERSData> dataObjects)
dataObjects - the data objects/groups to add.public TimeStampRequest generateTimeStampRequest(TimeStampRequestGenerator tspReqGenerator) throws TSPException, java.io.IOException
tspReqGenerator - generator to use for building the request.TSPException - on a time-stamp processing error.java.io.IOException - on an encoding error.public TimeStampRequest generateTimeStampRequest(TimeStampRequestGenerator tspReqGenerator, java.math.BigInteger nonce) throws TSPException, java.io.IOException
tspReqGenerator - generator to use for building the request.nonce - nonce to include in the request.TSPException - on a time-stamp processing error.java.io.IOException - on an encoding error.public ERSArchiveTimeStamp generateArchiveTimeStamp(TimeStampResponse tspResponse) throws TSPException, ERSException
tspResponse - the response carrying the time-stamp over the root hash.TSPException - if the response has an error status or its imprint does not match.ERSException - if more than one reduced hash tree is present, or on a processing error.public java.util.List<ERSArchiveTimeStamp> generateArchiveTimeStamps(TimeStampResponse tspResponse) throws TSPException, ERSException
tspResponse - the response carrying the time-stamp over the root hash.TSPException - if the response has an error status or its imprint does not match.ERSException - on a processing error.