public final class AOXAdESASiCSSigner
extends java.lang.Object
implements es.gob.afirma.core.signers.AOSigner
KeyName
de la sección KeyInfo
.
Debido a errores en algunas versiones del entorno de ejecución de Java, esta clase puede generar ocasionalmente
mensajes en consola del tipo: [Fatal Error] :1:1: Content is not allowed in prolog.
. Estos
deben ignorarse, ya que no indican ninguna condición de error ni malfuncionamiento.
Constructor and Description |
---|
AOXAdESASiCSSigner() |
Modifier and Type | Method and Description |
---|---|
byte[] |
cosign(byte[] data,
byte[] sign,
java.lang.String algorithm,
java.security.PrivateKey key,
java.security.cert.Certificate[] certChain,
java.util.Properties extraParams) |
byte[] |
cosign(byte[] sign,
java.lang.String algorithm,
java.security.PrivateKey key,
java.security.cert.Certificate[] certChain,
java.util.Properties xParams) |
byte[] |
countersign(byte[] sign,
java.lang.String algorithm,
es.gob.afirma.core.signers.CounterSignTarget targetType,
java.lang.Object[] targets,
java.security.PrivateKey key,
java.security.cert.Certificate[] certChain,
java.util.Properties xParams) |
byte[] |
getData(byte[] signData) |
java.lang.String |
getSignedName(java.lang.String originalName,
java.lang.String inText) |
es.gob.afirma.core.util.tree.AOTreeModel |
getSignersStructure(byte[] sign,
boolean asSimpleSignInfo) |
es.gob.afirma.core.signers.AOSignInfo |
getSignInfo(byte[] signData) |
boolean |
isSign(byte[] is) |
boolean |
isValidDataFile(byte[] data) |
static java.util.Properties |
setASiCProperties(java.util.Properties xParams,
byte[] data)
Establece los parámetros necesarios (modificando los actuales incompatibles si fuese necesario)
para crear firmas XAdES-ASiC-S.
|
byte[] |
sign(byte[] data,
java.lang.String algorithm,
java.security.PrivateKey key,
java.security.cert.Certificate[] certChain,
java.util.Properties xParams) |
public byte[] sign(byte[] data, java.lang.String algorithm, java.security.PrivateKey key, java.security.cert.Certificate[] certChain, java.util.Properties xParams) throws es.gob.afirma.core.AOException, java.io.IOException
sign
in interface es.gob.afirma.core.signers.AOSimpleSigner
es.gob.afirma.core.AOException
java.io.IOException
public byte[] cosign(byte[] data, byte[] sign, java.lang.String algorithm, java.security.PrivateKey key, java.security.cert.Certificate[] certChain, java.util.Properties extraParams) throws es.gob.afirma.core.AOException, java.io.IOException
cosign
in interface es.gob.afirma.core.signers.AOCoSigner
es.gob.afirma.core.AOException
java.io.IOException
public byte[] cosign(byte[] sign, java.lang.String algorithm, java.security.PrivateKey key, java.security.cert.Certificate[] certChain, java.util.Properties xParams) throws es.gob.afirma.core.AOException, java.io.IOException
cosign
in interface es.gob.afirma.core.signers.AOCoSigner
es.gob.afirma.core.AOException
java.io.IOException
public byte[] countersign(byte[] sign, java.lang.String algorithm, es.gob.afirma.core.signers.CounterSignTarget targetType, java.lang.Object[] targets, java.security.PrivateKey key, java.security.cert.Certificate[] certChain, java.util.Properties xParams) throws es.gob.afirma.core.AOException, java.io.IOException
countersign
in interface es.gob.afirma.core.signers.AOCounterSigner
es.gob.afirma.core.AOException
java.io.IOException
public es.gob.afirma.core.util.tree.AOTreeModel getSignersStructure(byte[] sign, boolean asSimpleSignInfo) throws es.gob.afirma.core.AOInvalidFormatException, java.io.IOException
getSignersStructure
in interface es.gob.afirma.core.signers.AOSigner
es.gob.afirma.core.AOInvalidFormatException
java.io.IOException
public boolean isSign(byte[] is) throws java.io.IOException
isSign
in interface es.gob.afirma.core.signers.AOSigner
java.io.IOException
public boolean isValidDataFile(byte[] data)
isValidDataFile
in interface es.gob.afirma.core.signers.AOSigner
public java.lang.String getSignedName(java.lang.String originalName, java.lang.String inText)
getSignedName
in interface es.gob.afirma.core.signers.AOSigner
public byte[] getData(byte[] signData) throws java.io.IOException
getData
in interface es.gob.afirma.core.signers.AOSigner
java.io.IOException
public es.gob.afirma.core.signers.AOSignInfo getSignInfo(byte[] signData) throws es.gob.afirma.core.AOException, java.io.IOException
getSignInfo
in interface es.gob.afirma.core.signers.AOSigner
es.gob.afirma.core.AOException
java.io.IOException
public static java.util.Properties setASiCProperties(java.util.Properties xParams, byte[] data)
xParams
- Parámetros adicionales actuales de la firma (puede ser null
si no
hay ninguno.data
- Datos que se van a firmar.