Class SigAndRefsTimeStampV2
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.SigAndRefsTimeStampV2
- All Implemented Interfaces:
SignatureAttribute<Element>,Comparable
public class SigAndRefsTimeStampV2 extends XAdESTimeStampType
-
Field Summary
Fields Modifier and Type Field Description static StringIDENTIFIERstatic List<String>mandatoryAttributesstatic List<String>optionalAttributesFields inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.schema.TimeStamp
index, signatureContainer, signatureVerifier -
Constructor Summary
Constructors Constructor Description SigAndRefsTimeStampV2(CadesSignatureContainer signatureContainer)Construtor usado para criar um novo carimbo do tempo.SigAndRefsTimeStampV2(AbstractVerifier signatureVerifier, Integer index)Construtor usado para verificação do atributoSigAndRefsTimeStampV2(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 Type Method Description protected byte[]getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier)Calcula o hash do atributoprotected StringgetElementName()Retorna a tag XML do atributoStringgetIdentifier()Retorna o identificador do atributoprotected booleanisAttributeHashValid(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier, byte[] expected)protected TimeStampVerifierInterfacemakeTimeStampVerifier(boolean containsRefsTimestamp, boolean containsArchiveTimestamp)Cria um objetoTimeStampVerifierInterfaceMethods inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.schema.XAdESTimeStampType
createSignerInformationVerifier, decode, getEncoded, getReport, isSigned, isUnique, validate, validateMethods inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.schema.TimeStamp
addUnsignedAttribute, buildTimeStampToken, compareTo, getContentInfo, getTimeReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface br.ufsc.labsec.signature.conformanceVerifier.common.SignatureAttribute
getValue
-
Field Details
-
IDENTIFIER
- See Also:
- Constant Field Values
-
mandatoryAttributes
-
optionalAttributes
-
-
Constructor Details
-
SigAndRefsTimeStampV2
public SigAndRefsTimeStampV2(AbstractVerifier signatureVerifier, Integer index) throws SignatureAttributeExceptionConstrutor usado para verificação do atributo- Parameters:
signatureVerifier- Usado para criar e verificar o atributoindex- Índice usado para selecionar o atributo- Throws:
SignatureAttributeException
-
SigAndRefsTimeStampV2
Construtor usado para criar um novo carimbo do tempo.- Parameters:
signatureContainer- O conteúdo do carimbo do tempo
-
SigAndRefsTimeStampV2
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, NoSuchAlgorithmExceptionCalcula 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, IOExceptionCria um objetoTimeStampVerifierInterface- Overrides:
makeTimeStampVerifierin classXAdESTimeStampType- Returns:
- O objeto criado
- Throws:
EncodingExceptionIOException
-