Class ArchiveTimeStamp
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.jades.attributes.TimeStamp
br.ufsc.labsec.signature.conformanceVerifier.jades.attributes.unsigned.SignatureTimeStamp
br.ufsc.labsec.signature.conformanceVerifier.jades.attributes.unsigned.ArchiveTimeStamp
- All Implemented Interfaces:
SignatureAttribute<JadesAttrCommonStruct>
public class ArchiveTimeStamp extends SignatureTimeStamp
-
Field Summary
Fields Modifier and Type Field Description static String
IDENTIFIER
Entrada no cabeçalho que relacionam o SigningCertificateFields inherited from class br.ufsc.labsec.signature.conformanceVerifier.jades.attributes.unsigned.SignatureTimeStamp
CANON_ALG, ENCODING, signatureVerifier, SPEC_REF, TST_TOKENS, TYPE, VAL
Fields inherited from class br.ufsc.labsec.signature.conformanceVerifier.jades.attributes.TimeStamp
canonicalizationAlgorithm, stamps
-
Constructor Summary
Constructors Constructor Description ArchiveTimeStamp(Verifier signatureVerifier, org.json.JSONObject protectedHeader, org.json.JSONObject unprotectedHeader)
ArchiveTimeStamp(String type, String encoding, String specRef, org.bouncycastle.asn1.cms.ContentInfo contentInfo, String canonAlg)
ArchiveTimeStamp(List<TstToken> tokens, String canonAlg)
ArchiveTimeStamp(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
-
Method Summary
Modifier and Type Method Description protected byte[]
getHashFromSignature(String hashAlgorithmId)
Calcula o valor de hash do carimbo de tempo de arquivamentoString
getIdentifier()
Retorna o identificador do atributoprotected boolean
isLast(TstToken token)
Verifica se o atributo é o último carimbo na assinaturaMethods inherited from class br.ufsc.labsec.signature.conformanceVerifier.jades.attributes.unsigned.SignatureTimeStamp
decode, decode, decodeValues, getEncoded, getJadesVerifier, isSigned, isUnique, validate
-
Field Details
-
IDENTIFIER
Entrada no cabeçalho que relacionam o SigningCertificate- See Also:
- Constant Field Values
-
-
Constructor Details
-
ArchiveTimeStamp
public ArchiveTimeStamp(Verifier signatureVerifier, org.json.JSONObject protectedHeader, org.json.JSONObject unprotectedHeader) -
ArchiveTimeStamp
public ArchiveTimeStamp(org.bouncycastle.asn1.cms.ContentInfo contentInfo) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
ArchiveTimeStamp
public ArchiveTimeStamp(String type, String encoding, String specRef, org.bouncycastle.asn1.cms.ContentInfo contentInfo, String canonAlg) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
ArchiveTimeStamp
- Throws:
SignatureAttributeException
-
-
Method Details
-
getHashFromSignature
Calcula o valor de hash do carimbo de tempo de arquivamento- Overrides:
getHashFromSignature
in classSignatureTimeStamp
- Parameters:
hashAlgorithmId
- O algoritmo a ser utilizado no cálculo- Returns:
- O valor de hash do carimbo
- Throws:
PbadException
- Exceção em caso de erro na canonização
-
getIdentifier
Retorna o identificador do atributo- Specified by:
getIdentifier
in interfaceSignatureAttribute<JadesAttrCommonStruct>
- Overrides:
getIdentifier
in classSignatureTimeStamp
- Returns:
- O identificador do atributo
-
isLast
Verifica se o atributo é o último carimbo na assinatura- Overrides:
isLast
in classSignatureTimeStamp
- Returns:
- Indica se o carimbo é o último na assinatura
- Throws:
TimeStampException
- Exceção em caso de erro na verificação da lista de carimbos
-