public class CAdESTimeStampSigner extends Object implements PKCS7TimeStampSigner
| Constructor and Description |
|---|
CAdESTimeStampSigner() |
| Modifier and Type | Method and Description |
|---|---|
List<Timestamp> |
checkTimeStampOnSignature(byte[] signature)
Check a timestamp on CADES signature
|
Timestamp |
checkTimeStampWithContent(byte[] timeStamp,
byte[] content)
Check a timestamp for a informed content
|
Timestamp |
checkTimeStampWithHash(byte[] timeStamp,
byte[] hash)
Check a timestamp for a informed calculated hash from content
|
byte[] |
doTimeStampForContent(byte[] content)
Generates a timestamp for a content
|
byte[] |
doTimeStampForSignature(byte[] signature)
Generates a timestamp for a Digital Signature on CADES format,
the result will contains the signature whith timestamp
|
byte[] |
doTimeStampFromHashContent(byte[] hash)
Generates a timestamp to a previous calculated hash from a content
|
Certificate[] |
getCertificateChain() |
void |
setCertificateChain(Certificate[] certificateChain) |
void |
setCertificates(Certificate[] certificates)
Assign a Certificate
|
void |
setPrivateKey(PrivateKey privateKey)
Private key required for asymmetric cryptography
|
void |
setSignaturePolicy(PolicyFactory.Policies signaturePolicy)
Set a signature policy
|
public byte[] doTimeStampForSignature(byte[] signature)
throws SignerException
TimeStampCadesSignerdoTimeStampForSignature in interface TimeStampCadesSignersignature - signature to be timestampedSignerExceptionpublic byte[] doTimeStampForContent(byte[] content)
TimeStampCadesSignerdoTimeStampForContent in interface TimeStampCadesSignercontent - to be signpublic byte[] doTimeStampFromHashContent(byte[] hash)
TimeStampCadesSignerdoTimeStampFromHashContent in interface TimeStampCadesSignerhash - to be signpublic List<Timestamp> checkTimeStampOnSignature(byte[] signature)
TimeStampCadesSignercheckTimeStampOnSignature in interface TimeStampCadesSignersignature - CADES signaturepublic Timestamp checkTimeStampWithContent(byte[] timeStamp, byte[] content)
TimeStampCadesSignercheckTimeStampWithContent in interface TimeStampCadesSignertimeStamp - timestamp to checkcontent - content related to timestamppublic Timestamp checkTimeStampWithHash(byte[] timeStamp, byte[] hash)
TimeStampCadesSignercheckTimeStampWithHash in interface TimeStampCadesSignertimeStamp - timestamp contenthash - hash to checkpublic void setSignaturePolicy(PolicyFactory.Policies signaturePolicy)
TimeStampCadesSignersetSignaturePolicy in interface TimeStampCadesSignersignaturePolicy - set signature policypublic void setCertificates(Certificate[] certificates)
TimeStampCadesSignersetCertificates in interface TimeStampCadesSignercertificates - set certificatepublic Certificate[] getCertificateChain()
public void setCertificateChain(Certificate[] certificateChain)
public void setPrivateKey(PrivateKey privateKey)
TimeStampCadesSignersetPrivateKey in interface TimeStampCadesSignerprivateKey - set private keyCopyright © 2021 SERPRO - Serviço Federal de Processamento de Dados. All rights reserved.