Class CadesSigner
java.lang.Object
br.ufsc.labsec.signature.signer.signatureSwitch.SignatureDataWrapperGenerator
br.ufsc.labsec.signature.conformanceVerifier.cades.AbstractCadesSigner
br.ufsc.labsec.signature.conformanceVerifier.cades.CadesSigner
- All Implemented Interfaces:
Signer<CadesInformation>
public class CadesSigner extends AbstractCadesSigner implements Signer<CadesInformation>
Esta classe cria uma assinatura CAdES em um documento.
-
Field Summary
Fields inherited from class br.ufsc.labsec.signature.conformanceVerifier.cades.AbstractCadesSigner
fileToBeSigned, signature, signatureContainer
-
Constructor Summary
Constructors Constructor Description CadesSigner(CadesSignatureComponent cadesSignature)
Construtor -
Method Summary
Modifier and Type Method Description SignatureDataWrapper
getSignature(FileToBeSigned<? extends CadesInformation> fileToBeSigned)
Inicializa o gerador de contêiner de assinaturaInputStream
getSignatureStream()
Retorna o arquivo assinadoboolean
sign(FileToBeSigned<? extends CadesInformation> fileToBeSigned)
Realiza a assinaturaboolean
supports(FileToBeSigned<? extends CadesInformation> fileToBeSigned)
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.cades.AbstractCadesSigner
getComponent, getPoliciesAvailable, getSignature, getSignedAttributesAvailable, getUnsignedAttributesAvailable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface br.ufsc.labsec.signature.Signer
getPoliciesAvailable, getSignedAttributesAvailable, getUnsignedAttributesAvailable
-
Constructor Details
-
CadesSigner
Construtor- Parameters:
cadesSignature
- Componente de assinatura CAdES
-
-
Method Details
-
getSignature
public SignatureDataWrapper getSignature(FileToBeSigned<? extends CadesInformation> fileToBeSigned) throws SignerExceptionInicializa o gerador de contêiner de assinatura- Specified by:
getSignature
in interfaceSigner<CadesInformation>
- Parameters:
fileToBeSigned
- Informações do arquivo a ser assinado- Throws:
SignerException
-
sign
public boolean sign(FileToBeSigned<? extends CadesInformation> fileToBeSigned) throws SignerExceptionRealiza a assinatura- Specified by:
sign
in interfaceSigner<CadesInformation>
- Returns:
- Valor verdade representando se a assinatura foi gerada corretamente.
- Throws:
SignerException
-
supports
public boolean supports(FileToBeSigned<? extends CadesInformation> fileToBeSigned) throws SignerException, CertificationPathException- Specified by:
supports
in interfaceSigner<CadesInformation>
- Throws:
SignerException
CertificationPathException
-
getSignatureStream
Retorna o arquivo assinado- Specified by:
getSignatureStream
in interfaceSigner<CadesInformation>
- Returns:
- O
InputStream
do arquivo assinado
-