public class TimestampGeneratorImpl extends Object implements TimeStampGenerator
| Constructor and Description |
|---|
TimestampGeneratorImpl() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generateTimeStamp()
Sends the time stamp request to a time stamp server
|
void |
initialize(byte[] content,
PrivateKey privateKey,
Certificate[] certificates,
byte[] hash)
Initializes the attributes needed to get the time stamp
|
void |
validateTimeStamp(byte[] content,
byte[] timestamp,
byte[] hash)
Validate a time stamp and the original content
|
public void initialize(byte[] content,
PrivateKey privateKey,
Certificate[] certificates,
byte[] hash)
throws CertificateCoreException
initialize in interface TimeStampGeneratorcontent - if it is assigned, the parameter hash must to be nullprivateKey - private key for signing of timestampcertificates - certificate chainhash - if it is assigned, the parameter content must to be nullCertificateCoreException - exceptionpublic byte[] generateTimeStamp()
throws CertificateCoreException
generateTimeStamp in interface TimeStampGeneratorCertificateCoreExceptionpublic void validateTimeStamp(byte[] content,
byte[] timestamp,
byte[] hash)
throws CertificateCoreException
validateTimeStamp in interface TimeStampGeneratorcontent - content to be validatedtimestamp - timestamphash - hashCertificateCoreExceptionCopyright © 2022 SERPRO - Serviço Federal de Processamento de Dados. All rights reserved.