Class SignatureTimeStamp
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.schema.TimeStamp
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.schema.XAdESTimeStampType
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.SignatureTimeStamp
- All Implemented Interfaces:
SignatureAttribute<Element>, Comparable
- Direct Known Subclasses:
IndividualDataObjectsTimeStamp
Representa o carimbo do tempo sobre a assinatura.
Esquema do atributo SignatureTimeStamp retirado do ETSI TS 101 903:
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
-
Field Summary
FieldsFields inherited from class TimeStamp
index, signatureContainer, signatureVerifier -
Constructor Summary
ConstructorsConstructorDescriptionSignatureTimeStamp(CadesSignatureContainer signatureContainer) Construtor usado para criar um novo carimbo do tempoSignatureTimeStamp(AbstractVerifier signatureVerifier, Integer index) Construtor usado para instanciar um ou mais carimbos do tempo de uma assinaturaSignatureTimeStamp(Element attributeEncoded) Decodifica o atributo para adição de atributos ou obtenção de dados do carimbo do tempo -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier) Retorna o valor de hash da assinaturaprotected StringRetorna o nome da tag do atributoRetorna o identificador do atributoprotected booleanisAttributeHashValid(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier, byte[] expected) protected TimeStampVerifierInterfacemakeTimeStampVerifier(boolean containsRefsTimestamp, boolean containsArchiveTimestamp) Cria um objetoTimeStampVerifierInterfaceMethods inherited from class XAdESTimeStampType
createSignerInformationVerifier, decode, getEncoded, getReport, isSigned, isUnique, validate, validateMethods inherited from class TimeStamp
addUnsignedAttribute, buildTimeStampToken, compareTo, getContentInfo, getTimeReferenceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SignatureAttribute
getValue
-
Field Details
-
IDENTIFIER
- See Also:
-
-
Constructor Details
-
SignatureTimeStamp
public SignatureTimeStamp(AbstractVerifier signatureVerifier, Integer index) throws SignatureAttributeException Construtor usado para instanciar um ou mais carimbos do tempo de uma assinatura- Parameters:
signatureVerifier- Usado para criar e verificar o atributoindex- Índice do atributo. Este parâmetro é usado para atributos que podem aparecer mais de uma vez- Throws:
SignatureAttributeException
-
SignatureTimeStamp
Construtor usado para criar um novo carimbo do tempo- Parameters:
signatureContainer- O conteúdo do carimbo do tempo
-
SignatureTimeStamp
Decodifica o atributo para adição de atributos ou obtenção de dados do carimbo do tempo- Parameters:
attributeEncoded- O atributo codificado- Throws:
SignatureAttributeException
-
-
Method Details
-
getIdentifier
Retorna o identificador do atributo- Specified by:
getIdentifierin interfaceSignatureAttribute<Element>- Specified by:
getIdentifierin classTimeStamp- Returns:
- O identificador do atributo
-
getElementName
Retorna o nome da tag do atributo- Specified by:
getElementNamein classXAdESTimeStampType- Returns:
- Retorna "XAdES:SignatureTimeStamp"
-
getAttributeHash
protected byte[] getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier) throws PbadException, NoSuchAlgorithmException Retorna o valor de hash da assinatura- Specified by:
getAttributeHashin classTimeStamp- Parameters:
identifier- O algoritmo a ser utilizado para o cálculo de hash- Returns:
- Array de bytes com valor de hash da assinatura
- Throws:
PbadException- Exceção em caso de erro no cálculoNoSuchAlgorithmException
-
isAttributeHashValid
protected boolean isAttributeHashValid(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier, byte[] expected) throws PbadException - Specified by:
isAttributeHashValidin classTimeStamp- Throws:
PbadException
-
makeTimeStampVerifier
protected TimeStampVerifierInterface makeTimeStampVerifier(boolean containsRefsTimestamp, boolean containsArchiveTimestamp) throws EncodingException, IOException Cria um objetoTimeStampVerifierInterface- Overrides:
makeTimeStampVerifierin classXAdESTimeStampType- Returns:
- O objeto criado
- Throws:
EncodingExceptionIOException
-