Class SignatureConstants


  • public final class SignatureConstants
    extends java.lang.Object

    Class 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.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.