Class SigAndRefsTimeStampV2
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStamp
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStampToken
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.SigAndRefsTimeStampV2
- All Implemented Interfaces:
SignatureAttribute<Element>
,Comparable
public class SigAndRefsTimeStampV2 extends TimeStampToken
-
Field Summary
Fields Modifier and Type Field Description static String
IDENTIFIER
static List<String>
mandatoryAttributes
static List<String>
optionalAttributes
Fields inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStamp
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 String
getElementName()
Retorna a tag XML do atributoString
getIdentifier()
Retorna o identificador do atributoprotected boolean
isAttributeHashValid(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier, byte[] expected)
protected TimeStampVerifierInterface
makeTimeStampVerifier(boolean containsRefsTimestamp, boolean containsArchiveTimestamp)
Cria um objetoTimeStampVerifierInterface
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStampToken
createSignerInformationVerifier, decode, getEncoded, getReport, isSigned, isUnique, validate, validate
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStamp
addUnsignedAttribute, buildTimeStampToken, compareTo, getContentInfo, getTimeReference
-
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:
getIdentifier
in interfaceSignatureAttribute<Element>
- Specified by:
getIdentifier
in classTimeStamp
- Returns:
- O identificador do atributo
-
getElementName
Retorna a tag XML do atributo- Specified by:
getElementName
in classTimeStampToken
- Returns:
- Retorna "XAdES:SigAndRefsTimeStamp"
-
getAttributeHash
protected byte[] getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier) throws PbadException, NoSuchAlgorithmExceptionCalcula o hash do atributo- Specified by:
getAttributeHash
in 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:
isAttributeHashValid
in classTimeStamp
- Throws:
PbadException
-
makeTimeStampVerifier
protected TimeStampVerifierInterface makeTimeStampVerifier(boolean containsRefsTimestamp, boolean containsArchiveTimestamp) throws EncodingException, IOExceptionCria um objetoTimeStampVerifierInterface
- Overrides:
makeTimeStampVerifier
in classTimeStampToken
- Returns:
- O objeto criado
- Throws:
EncodingException
IOException
-