Package es.gob.afirma.signature
Class SignatureConstants
- java.lang.Object
-
- es.gob.afirma.signature.SignatureConstants
-
public final class SignatureConstants extends java.lang.ObjectClass that defines constants related to processes with signatures.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.3, 06/03/2020.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_SIGN_MODEConstant attribute that represents default signature mode.static java.util.Map<java.lang.String,java.lang.String>DIGEST_ALGORITHM_URIConstant attribute that represents the URI of allowed hash algorithms to use with XADES signatures.static java.lang.StringMF_REFERENCES_PROPERTYNAMEConstant attribute that represents property name used in Manifest references list (external references in a detached signature).static java.lang.StringPDF_APPROVALConstant attribute that identifies an Approval PDF signature.static java.lang.StringPDF_CERTIFIEDConstant attribute that identifies a Certified PDF signature.static java.lang.StringSIGN_ALGORITHM_SHA1Constant attribute that represents SHA1 algorithm.static java.lang.StringSIGN_ALGORITHM_SHA1WITHECDSAConstant attribute that represents SHA1withECDSA algorithm.static java.lang.StringSIGN_ALGORITHM_SHA1WITHRSAConstant attribute that represents SHA1withRSA algorithm.static java.lang.StringSIGN_ALGORITHM_SHA256Constant attribute that represents SHA256 algorithm.static java.lang.StringSIGN_ALGORITHM_SHA256WITHECDSAConstant attribute that represents SHA256withECDSA algorithm.static java.lang.StringSIGN_ALGORITHM_SHA256WITHRSAConstant attribute that represents SHA256withRSA algorithm.static java.lang.StringSIGN_ALGORITHM_SHA384Constant attribute that represents SHA384 algorithm.static java.lang.StringSIGN_ALGORITHM_SHA384WITHECDSAConstant attribute that represents SHA384withECDSA algorithm.static java.lang.StringSIGN_ALGORITHM_SHA384WITHRSAConstant attribute that represents SHA384withRSA algorithm.static java.lang.StringSIGN_ALGORITHM_SHA512Constant attribute that represents SHA512 algorithm.static java.lang.StringSIGN_ALGORITHM_SHA512WITHECDSAConstant attribute that represents SHA512withECDSA algorithm.static java.lang.StringSIGN_ALGORITHM_SHA512WITHRSAConstant attribute that represents SHA512withRSA algorithm.static java.util.Map<java.lang.String,java.lang.String>SIGN_ALGORITHM_URIConstant attribute that represents the URI of allowed signature algorithms to use with XADES signatures.static java.util.Map<java.lang.String,java.lang.String>SIGN_ALGORITHMS_SUPPORTConstant attribute that represents the allowed signature algorithms to use with CADES, PAdES and XAdES signatures.static java.lang.StringSIGN_FORMAT_ASICS_CADES_BASELINEConstant attribute that represents ASiC-S CAdES Baseline signature format.static java.lang.StringSIGN_FORMAT_ASICS_XADES_BASELINEConstant attribute that represents ASiC-S XAdES Baseline signature format.static java.lang.StringSIGN_FORMAT_CADESConstant attribute that represents CAdES signature format.static java.lang.StringSIGN_FORMAT_CADES_BASELINEConstant attribute that represents CAdES Baseline signature format.static java.lang.StringSIGN_FORMAT_PADESConstant attribute that represents PAdES signature format.static java.lang.StringSIGN_FORMAT_PADES_BASELINEConstant attribute that represents PAdES Baseline signature format.static java.lang.StringSIGN_FORMAT_PADES_BASICConstant attribute that represents PAdES signature format.static java.lang.StringSIGN_FORMAT_XADESConstant attribute that represents XAdES signature format.static java.lang.StringSIGN_FORMAT_XADES_BASELINEConstant attribute that represents XAdES Baseline signature format.static java.lang.StringSIGN_FORMAT_XADES_DETACHEDConstant attribute that identifies the XAdES detached signature.static java.lang.StringSIGN_FORMAT_XADES_ENVELOPEDConstant attribute that identifies the XAdES enveloped signature.static java.lang.StringSIGN_FORMAT_XADES_ENVELOPINGConstant attribute that identifies the XAdES enveloping signature.static java.lang.StringSIGN_FORMAT_XADES_EXTERNALLY_DETACHEDConstant attribute that identifies the XAdES externally detached signature.static java.lang.StringSIGN_MODE_EXPLICITConstant attribute that represents explicit signature mode.static java.lang.StringSIGN_MODE_EXPLICIT_HASHConstant attribute that represents explicit hash signature mode.static java.lang.StringSIGN_MODE_IMPLICITConstant attribute that represents implicit signature mode.static java.util.Set<java.lang.String>SUPPORTED_COUNTER_XADES_SIGN_FORMATConstant attribute that represents supported XAdES counter signature formats.static java.util.Set<java.lang.String>SUPPORTED_XADES_SIGN_FORMATConstant attribute that represents supported XAdES signature formats.static java.lang.StringUTF8_ENCODINGConstant attribute that identifies the UTF-8 encoding.static java.lang.StringXADES_DATA_FORMAT_DESCRIPTION_PROP_DEFAULTConstant attribute that represents the property description of data object format.static java.lang.StringXADES_DATA_FORMAT_MIME_PROP_DEFAULTConstant attribute that represents the property mimetype of data object format.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringcomposeSignatureAlgorithmName(java.lang.String algorithm, java.lang.String keyType)Compone el nombre del algoritmo de firma que utiliza un algoritmo de huella concreto y emplea un determinado tipo de clave de cifrado.static java.lang.StringgetDigestAlgorithmName(java.lang.String pseudoName)Obtiene el nombre de un algoritmo de huella digital a partir de una de las variantes de este.
-
-
-
Field Detail
-
UTF8_ENCODING
public static final java.lang.String UTF8_ENCODING
Constant attribute that identifies the UTF-8 encoding.- See Also:
- Constant Field Values
-
SIGN_FORMAT_CADES
public static final java.lang.String SIGN_FORMAT_CADES
Constant attribute that represents CAdES signature format.- See Also:
- Constant Field Values
-
SIGN_FORMAT_XADES_DETACHED
public static final java.lang.String SIGN_FORMAT_XADES_DETACHED
Constant attribute that identifies the XAdES detached signature.- See Also:
- Constant Field Values
-
SIGN_FORMAT_XADES_EXTERNALLY_DETACHED
public static final java.lang.String SIGN_FORMAT_XADES_EXTERNALLY_DETACHED
Constant attribute that identifies the XAdES externally detached signature.- See Also:
- Constant Field Values
-
SIGN_FORMAT_XADES_ENVELOPED
public static final java.lang.String SIGN_FORMAT_XADES_ENVELOPED
Constant attribute that identifies the XAdES enveloped signature.- See Also:
- Constant Field Values
-
SIGN_FORMAT_XADES_ENVELOPING
public static final java.lang.String SIGN_FORMAT_XADES_ENVELOPING
Constant attribute that identifies the XAdES enveloping signature.- See Also:
- Constant Field Values
-
SIGN_FORMAT_PADES
public static final java.lang.String SIGN_FORMAT_PADES
Constant attribute that represents PAdES signature format.- See Also:
- Constant Field Values
-
SIGN_FORMAT_PADES_BASIC
public static final java.lang.String SIGN_FORMAT_PADES_BASIC
Constant attribute that represents PAdES signature format.- See Also:
- Constant Field Values
-
SIGN_FORMAT_XADES
public static final java.lang.String SIGN_FORMAT_XADES
Constant attribute that represents XAdES signature format.- See Also:
- Constant Field Values
-
SIGN_FORMAT_ASICS_CADES_BASELINE
public static final java.lang.String SIGN_FORMAT_ASICS_CADES_BASELINE
Constant attribute that represents ASiC-S CAdES Baseline signature format.- See Also:
- Constant Field Values
-
SIGN_FORMAT_ASICS_XADES_BASELINE
public static final java.lang.String SIGN_FORMAT_ASICS_XADES_BASELINE
Constant attribute that represents ASiC-S XAdES Baseline signature format.- See Also:
- Constant Field Values
-
SIGN_MODE_EXPLICIT
public static final java.lang.String SIGN_MODE_EXPLICIT
Constant attribute that represents explicit signature mode.- See Also:
- Constant Field Values
-
SIGN_MODE_EXPLICIT_HASH
public static final java.lang.String SIGN_MODE_EXPLICIT_HASH
Constant attribute that represents explicit hash signature mode.- See Also:
- Constant Field Values
-
SIGN_MODE_IMPLICIT
public static final java.lang.String SIGN_MODE_IMPLICIT
Constant attribute that represents implicit signature mode.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA1
public static final java.lang.String SIGN_ALGORITHM_SHA1
Constant attribute that represents SHA1 algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA256
public static final java.lang.String SIGN_ALGORITHM_SHA256
Constant attribute that represents SHA256 algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA384
public static final java.lang.String SIGN_ALGORITHM_SHA384
Constant attribute that represents SHA384 algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA512
public static final java.lang.String SIGN_ALGORITHM_SHA512
Constant attribute that represents SHA512 algorithm.- See Also:
- Constant Field Values
-
DEFAULT_SIGN_MODE
public static final java.lang.String DEFAULT_SIGN_MODE
Constant attribute that represents default signature mode.- See Also:
- Constant Field Values
-
SUPPORTED_COUNTER_XADES_SIGN_FORMAT
public static final java.util.Set<java.lang.String> SUPPORTED_COUNTER_XADES_SIGN_FORMAT
Constant attribute that represents supported XAdES counter signature formats.
-
SUPPORTED_XADES_SIGN_FORMAT
public static final java.util.Set<java.lang.String> SUPPORTED_XADES_SIGN_FORMAT
Constant attribute that represents supported XAdES signature formats.
-
SIGN_ALGORITHM_SHA1WITHRSA
public static final java.lang.String SIGN_ALGORITHM_SHA1WITHRSA
Constant attribute that represents SHA1withRSA algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA256WITHRSA
public static final java.lang.String SIGN_ALGORITHM_SHA256WITHRSA
Constant attribute that represents SHA256withRSA algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA384WITHRSA
public static final java.lang.String SIGN_ALGORITHM_SHA384WITHRSA
Constant attribute that represents SHA384withRSA algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA512WITHRSA
public static final java.lang.String SIGN_ALGORITHM_SHA512WITHRSA
Constant attribute that represents SHA512withRSA algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA1WITHECDSA
public static final java.lang.String SIGN_ALGORITHM_SHA1WITHECDSA
Constant attribute that represents SHA1withECDSA algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA256WITHECDSA
public static final java.lang.String SIGN_ALGORITHM_SHA256WITHECDSA
Constant attribute that represents SHA256withECDSA algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA384WITHECDSA
public static final java.lang.String SIGN_ALGORITHM_SHA384WITHECDSA
Constant attribute that represents SHA384withECDSA algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_SHA512WITHECDSA
public static final java.lang.String SIGN_ALGORITHM_SHA512WITHECDSA
Constant attribute that represents SHA512withECDSA algorithm.- See Also:
- Constant Field Values
-
SIGN_ALGORITHM_URI
public static final java.util.Map<java.lang.String,java.lang.String> SIGN_ALGORITHM_URI
Constant attribute that represents the URI of allowed signature algorithms to use with XADES signatures.
-
DIGEST_ALGORITHM_URI
public static final java.util.Map<java.lang.String,java.lang.String> DIGEST_ALGORITHM_URI
Constant attribute that represents the URI of allowed hash algorithms to use with XADES signatures.
-
SIGN_ALGORITHMS_SUPPORT
public static final java.util.Map<java.lang.String,java.lang.String> SIGN_ALGORITHMS_SUPPORT
Constant attribute that represents the allowed signature algorithms to use with CADES, PAdES and XAdES signatures.
-
MF_REFERENCES_PROPERTYNAME
public static final java.lang.String MF_REFERENCES_PROPERTYNAME
Constant attribute that represents property name used in Manifest references list (external references in a detached signature).- See Also:
- Constant Field Values
-
PDF_CERTIFIED
public static final java.lang.String PDF_CERTIFIED
Constant attribute that identifies a Certified PDF signature.- See Also:
- Constant Field Values
-
PDF_APPROVAL
public static final java.lang.String PDF_APPROVAL
Constant attribute that identifies an Approval PDF signature.- See Also:
- Constant Field Values
-
SIGN_FORMAT_CADES_BASELINE
public static final java.lang.String SIGN_FORMAT_CADES_BASELINE
Constant attribute that represents CAdES Baseline signature format.- See Also:
- Constant Field Values
-
SIGN_FORMAT_XADES_BASELINE
public static final java.lang.String SIGN_FORMAT_XADES_BASELINE
Constant attribute that represents XAdES Baseline signature format.- See Also:
- Constant Field Values
-
SIGN_FORMAT_PADES_BASELINE
public static final java.lang.String SIGN_FORMAT_PADES_BASELINE
Constant attribute that represents PAdES Baseline signature format.- See Also:
- Constant Field Values
-
XADES_DATA_FORMAT_DESCRIPTION_PROP_DEFAULT
public static final java.lang.String XADES_DATA_FORMAT_DESCRIPTION_PROP_DEFAULT
Constant attribute that represents the property description of data object format.- See Also:
- Constant Field Values
-
XADES_DATA_FORMAT_MIME_PROP_DEFAULT
public static final java.lang.String XADES_DATA_FORMAT_MIME_PROP_DEFAULT
Constant attribute that represents the property mimetype of data object format.- See Also:
- Constant Field Values
-
-
Method Detail
-
composeSignatureAlgorithmName
public static java.lang.String composeSignatureAlgorithmName(java.lang.String algorithm, java.lang.String keyType)Compone el nombre del algoritmo de firma que utiliza un algoritmo de huella concreto y emplea un determinado tipo de clave de cifrado. El algoritmo de huella se extrae del algoritmo proporcionado, que puede ser de huella, de firma o una referencia al algoritmo (OID o URL).- Parameters:
algorithm- Algoritmo de huella digital o firma.keyType- Tipo de clave de firma.- Returns:
- Nombre del algoritmo de firma.
-
getDigestAlgorithmName
public static java.lang.String getDigestAlgorithmName(java.lang.String pseudoName)
Obtiene el nombre de un algoritmo de huella digital a partir de una de las variantes de este.- Parameters:
pseudoName- Nombre o variante del nombre del algoritmo de huella digital.- Returns:
- Nombre del algoritmo de huella digital.
-
-