public class VerifyTimestamp
extends Object
This source code is include with the SecureTime Java API distribution.
Given a file name, the process performs:
Modifier and Type | Field and Description |
---|---|
TSAservice |
theTSAservice
you can use as singleton because this is thread safe.
|
Constructor and Description |
---|
VerifyTimestamp() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Execute the demo from a command line.
|
static void |
testValidateAllTokens(org.bouncycastle.tsp.cms.CMSTimeStampedData cmsTimeStampedData)
Does the hash of the content data match what is recorded in the
timestamp? Calculate the digest / hash value of the
"protect data (content)".
|
void |
validate(org.bouncycastle.tsp.TimeStampToken aTimestamp,
FileInputStream theProtectedData)
Do all validations
|
void |
validateDigestValue(org.bouncycastle.tsp.TimeStampToken aTimestamp,
FileInputStream theProtectedData)
Does the provided timestamp contain the hash of the provided
"protected data"? Throw an exception if any issues.
|
public TSAservice theTSAservice
public static void main(String[] args)
for details
public static void testValidateAllTokens(org.bouncycastle.tsp.cms.CMSTimeStampedData cmsTimeStampedData) throws org.bouncycastle.operator.OperatorCreationException, IOException, org.bouncycastle.cms.CMSException, org.bouncycastle.tsp.cms.ImprintDigestInvalidException
org.bouncycastle.operator.OperatorCreationException
IOException
org.bouncycastle.cms.CMSException
org.bouncycastle.tsp.cms.ImprintDigestInvalidException
public void validate(org.bouncycastle.tsp.TimeStampToken aTimestamp, FileInputStream theProtectedData) throws org.bouncycastle.cms.CMSException, org.bouncycastle.operator.OperatorCreationException, IOException, org.bouncycastle.tsp.cms.ImprintDigestInvalidException
org.bouncycastle.cms.CMSException
org.bouncycastle.operator.OperatorCreationException
IOException
org.bouncycastle.tsp.cms.ImprintDigestInvalidException
public void validateDigestValue(org.bouncycastle.tsp.TimeStampToken aTimestamp, FileInputStream theProtectedData) throws org.bouncycastle.cms.CMSException, org.bouncycastle.operator.OperatorCreationException, IOException, org.bouncycastle.tsp.cms.ImprintDigestInvalidException
org.bouncycastle.cms.CMSException
org.bouncycastle.operator.OperatorCreationException
IOException
org.bouncycastle.tsp.cms.ImprintDigestInvalidException