Class SigAndRefsTimeStamp
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.SigAndRefsTimeStamp
- All Implemented Interfaces:
SignatureAttribute<Element>, Comparable
Representa o carimbo do tempo sobre as referências.
Esquema do atributo SigAndRefsTimeStamp retirado do ETSI TS 101 903:
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
-
Field Summary
FieldsFields inherited from class TimeStamp
index, signatureContainer, signatureVerifier -
Constructor Summary
ConstructorsConstructorDescriptionSigAndRefsTimeStamp(CadesSignatureContainer signatureContainer) Construtor usado para criar um novo carimbo do tempo.SigAndRefsTimeStamp(AbstractVerifier signatureVerifier, Integer index) Construtor usado para verificação do atributoSigAndRefsTimeStamp(Element genericEncoding) Construtor usado para decodificar carimbos do tempo e obter dados dos mesmos ou alterar os seus atributos não assinados. -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier) Calcula o hash do atributoprotected StringRetorna a tag XML 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:
-
mandatoryAttributes
-
optionalAttributes
-
-
Constructor Details
-
SigAndRefsTimeStamp
public SigAndRefsTimeStamp(AbstractVerifier signatureVerifier, Integer index) throws SignatureAttributeException Construtor usado para verificação do atributo- Parameters:
signatureVerifier- Usado para criar e verificar o atributoindex- Índice usado para selecionar o atributo- Throws:
SignatureAttributeException
-
SigAndRefsTimeStamp
Construtor usado para criar um novo carimbo do tempo.- Parameters:
signatureContainer- O conteúdo do carimbo do tempo
-
SigAndRefsTimeStamp
Construtor usado para decodificar carimbos do tempo e obter dados dos mesmos ou alterar os seus atributos não assinados.- Parameters:
genericEncoding- 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 a tag XML do atributo- Specified by:
getElementNamein classXAdESTimeStampType- Returns:
- Retorna "XAdES:SigAndRefsTimeStamp"
-
getAttributeHash
protected byte[] getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier) throws PbadException, NoSuchAlgorithmException Calcula o hash do atributo- Specified by:
getAttributeHashin classTimeStamp- Parameters:
identifier- O algoritmo utilizado- Returns:
- O valor de hash do atributo
- Throws:
PbadException- Exceção em caso de erro durante o 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
-