|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.tsp.ers.ERSArchiveTimeStamp
Carrier for an RFC 4998 ArchiveTimeStamp - an RFC 3161 time-stamp token together with the reduced hash tree (a sequence of PartialHashtrees) that binds a particular data object or data group to the time-stamped root hash. Provides operations to recover the root hash, confirm a data object is present, and validate the underlying time-stamp signature.
| Constructor Summary | |
ERSArchiveTimeStamp(org.bouncycastle.asn1.tsp.ArchiveTimeStamp archiveTimeStamp,
DigestCalculatorProvider digCalcProv)
Create an archive time-stamp from a parsed ArchiveTimeStamp structure. |
|
ERSArchiveTimeStamp(byte[] archiveTimeStamp,
DigestCalculatorProvider digCalcProv)
Create an archive time-stamp from an encoded ArchiveTimeStamp. |
|
| Method Summary | |
static ERSArchiveTimeStamp |
fromTimeStampToken(TimeStampToken tspToken,
DigestCalculatorProvider digCalcProv)
Build an ArchiveTimeStamp from a regular time stamp token. |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getDigestAlgorithmIdentifier()
|
byte[] |
getEncoded()
return the ASN.1 encoded representation of this object. |
java.util.Date |
getExpiryTime()
Return the not-after date for the time-stamp's signing certificate if it is present. |
java.util.Date |
getGenTime()
Return the generation time of the time-stamp associated with this archive time stamp. |
X509CertificateHolder |
getSigningCertificate()
Return the TimeStamp signing certificate if it is present. |
TimeStampToken |
getTimeStampToken()
|
boolean |
isContaining(ERSData data,
java.util.Date atDate)
Return true if the passed in data object/group is present in this archive time-stamp at the given date. |
org.bouncycastle.asn1.tsp.ArchiveTimeStamp |
toASN1Structure()
Return the underlying ASN.1 ArchiveTimeStamp structure. |
void |
validate(SignerInformationVerifier verifier)
Validate the time stamp associated with this ArchiveTimeStamp. |
void |
validatePresent(boolean isDataGroup,
byte[] hash,
java.util.Date atDate)
Validate that data with the given hash is present in this archive time-stamp at the given date. |
void |
validatePresent(ERSData data,
java.util.Date atDate)
Validate that the passed in data object/group is present in this archive time-stamp at the given date - that its hash appears in the reduced hash tree and the recovered root hash matches the time-stamp imprint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ERSArchiveTimeStamp(byte[] archiveTimeStamp,
DigestCalculatorProvider digCalcProv)
throws TSPException,
ERSException
archiveTimeStamp - the DER encoded ArchiveTimeStamp.digCalcProv - provider for the digest calculator matching the structure's digest algorithm.
public ERSArchiveTimeStamp(org.bouncycastle.asn1.tsp.ArchiveTimeStamp archiveTimeStamp,
DigestCalculatorProvider digCalcProv)
throws TSPException,
ERSException
archiveTimeStamp - the ArchiveTimeStamp to wrap.digCalcProv - provider for the digest calculator matching the structure's digest algorithm.| Method Detail |
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithmIdentifier()
public void validatePresent(ERSData data,
java.util.Date atDate)
throws ERSException
data - the data object or data group to check for.atDate - date the data is expected to be valid at; the time-stamp must not be in the future relative to it.
ERSException - if the data is not present, or the time-stamp generation time is after atDate.
public boolean isContaining(ERSData data,
java.util.Date atDate)
throws ERSException
validatePresent(ERSData, Date)
but returning a boolean rather than throwing on absence.
data - the data object or data group to check for.atDate - date the data is expected to be valid at.
ArchiveTimeStampValidationException - if the time-stamp generation time is after atDate.
ERSException
public void validatePresent(boolean isDataGroup,
byte[] hash,
java.util.Date atDate)
throws ERSException
isDataGroup - true if the hash represents a data group rather than a single object.hash - the (pre-computed) hash of the data object/group to check for.atDate - date the data is expected to be valid at.
ERSException - if the hash is not present, or the time-stamp generation time is after atDate.public TimeStampToken getTimeStampToken()
public X509CertificateHolder getSigningCertificate()
public void validate(SignerInformationVerifier verifier)
throws TSPException
verifier - signer verifier for the contained time stamp.
TSPException - in case of validation failure or error.public java.util.Date getGenTime()
public java.util.Date getExpiryTime()
public org.bouncycastle.asn1.tsp.ArchiveTimeStamp toASN1Structure()
public byte[] getEncoded()
throws java.io.IOException
java.io.IOException
public static ERSArchiveTimeStamp fromTimeStampToken(TimeStampToken tspToken,
DigestCalculatorProvider digCalcProv)
throws TSPException,
ERSException
tspToken - the TimeStampToken in the regular time stamp.digCalcProv - a digest calculator provider for use with the time stamp.
TSPException - on a failure to parse the time stamp token data.
ERSException - on a failure to convert the time stamp token to an archive time stamp.
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||