public final class AOCMSSigner
extends java.lang.Object
implements es.gob.afirma.core.signers.AOSigner
true
si se desea usar la hora y fecha del sistema como hora y fecha de firma, false
en caso contrario
Constructor and Description |
---|
AOCMSSigner() |
Modifier and Type | Method and Description |
---|---|
void |
addSignedAttribute(java.lang.String oid,
byte[] value)
Añade un atributo firmado al formato de firma seleccionado.
|
void |
addUnsignedAttribute(java.lang.String oid,
byte[] value)
Añade un atributo no firmado al formato de firma seleccionado.
|
byte[] |
cosign(byte[] data,
byte[] sign,
java.lang.String algorithm,
java.security.PrivateKey key,
java.security.cert.Certificate[] certChain,
java.util.Properties xParams) |
byte[] |
cosign(byte[] sign,
java.lang.String algorithm,
java.security.PrivateKey key,
java.security.cert.Certificate[] certChain,
java.util.Properties extraParams) |
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 extraParams) |
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[] signData) |
boolean |
isValidDataFile(byte[] data) |
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 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[] cosign(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[] 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 extraParams) 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)
getSignersStructure
in interface es.gob.afirma.core.signers.AOSigner
public boolean isSign(byte[] signData) 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 void addSignedAttribute(java.lang.String oid, byte[] value)
oid
- OID del objeto a introducir.value
- Valor asignadopublic void addUnsignedAttribute(java.lang.String oid, byte[] value)
oid
- OID del atributo a introducir.value
- Valor asignadopublic byte[] getData(byte[] signData) throws es.gob.afirma.core.AOException, java.io.IOException
getData
in interface es.gob.afirma.core.signers.AOSigner
es.gob.afirma.core.AOException
java.io.IOException
public java.lang.String getSignedName(java.lang.String originalName, java.lang.String inText)
getSignedName
in interface es.gob.afirma.core.signers.AOSigner
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
java.io.IOException
- Si no es posible leer la firma.es.gob.afirma.core.AOException