be.fgov.ehealth.etee.crypto.policies

## Enum SigningPolicy

- java.lang.Object
- - java.lang.Enum<SigningPolicy>
  - - be.fgov.ehealth.etee.crypto.policies.SigningPolicy

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SigningPolicy>

      public enum SigningPolicy
      extends java.lang.Enum<SigningPolicy>

  Acceptable eHealth Policies for signing.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ECDSA_SHA256` Elliptic Curve Digital Signature Algorithm (DSA) coupled with the Secure Hash Algorithm 256 (SHA256) algorithm.
    `EHEALTH_CERT` This is a combo policy that can be used for messages signed with eHealth Certificates: it combines `RSASSA_PSS_SHA256` and `ECDSA_SHA256`.
    `EID` This is a combo policy that can be used for messages signed with a Belgium eID: it combines `RSA_SHA256` and `ECDSA_SHA256`.
    `RSA_SHA256` RSA signature scheme using SHA256 as hash algorithm.
    `RSASSA_PSS_SHA256` RSASSA-PSS signature scheme using SHA256 as hash algorithm, MGF1 (with SHA256) as mask generation function, 32 as salt length, and 1 as trailer field.
    `WEB_AUTHN` This is a combo policy that can be used for messages signed with a registered Public Key: it combines `RSASSA_PSS_SHA256` and `ECDSA_SHA256`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.String>` | `getAltEncryptionAlgorithmOIDs()` Deprecated. Use `getEncryptionAlgorithmOIDs()`
    `java.lang.String` | `getDigestAlgorithmOID()`
    `java.lang.String` | `getEncryptionAlgorithmOID()` Deprecated. Use `getEncryptionAlgorithmOIDs()`
    `java.util.Set<java.lang.String>` | `getEncryptionAlgorithmOIDs()`
    `KeyType` | `getKeyType()`
    `static SigningPolicy` | `getPolicyByKeyType(SigningPolicy policy, KeyType keyType)`
    `static java.util.Set<SigningPolicy>` | `getPolicySet(SigningPolicy source)`
    `java.lang.String` | `getSignatureAlgorithmName()`
    `int` | `getSignKeySize()`
    `static SigningPolicy` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static SigningPolicy[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### RSASSA_PSS_SHA256

          public static final SigningPolicy RSASSA_PSS_SHA256

      RSASSA-PSS signature scheme using SHA256 as hash algorithm, MGF1 (with SHA256) as mask generation function, 32 as salt length, and 1 as trailer field.
      - Minimal keySize: 2048
      - Digest: SHA-256
      - SignatureAlgorithm: SHA256WITHRSAANDMGF1
      - Encryption: RSASSA-PSS

    - #### RSA_SHA256

          public static final SigningPolicy RSA_SHA256

      RSA signature scheme using SHA256 as hash algorithm.
      - Minimal keySize: 1024
      - Digest: SHA-256
      - SignatureAlgorithm: SHA256withRSA
      - Encryption: sha256WithRSAEncryption
      - Encryption alternative OIDs: RSA encryption

    - #### ECDSA_SHA256

          public static final SigningPolicy ECDSA_SHA256

      Elliptic Curve Digital Signature Algorithm (DSA) coupled with the Secure Hash Algorithm 256 (SHA256) algorithm.
      - Minimal keySize: 2048
      - Digest: SHA-256
      - SignatureAlgorithm: SHA256WITHECDSA
      - Encryption: EC

    - #### EHEALTH_CERT

          public static final SigningPolicy EHEALTH_CERT

      This is a combo policy that can be used for messages signed with eHealth Certificates: it combines `RSASSA_PSS_SHA256` and `ECDSA_SHA256`. It will depend on whether the given key is RSA or EC which policy will be applied.

    - #### EID

          public static final SigningPolicy EID

      This is a combo policy that can be used for messages signed with a Belgium eID: it combines `RSA_SHA256` and `ECDSA_SHA256`. It will depend on whether the given key is RSA or EC which policy will be applied.

    - #### WEB_AUTHN

          public static final SigningPolicy WEB_AUTHN

      This is a combo policy that can be used for messages signed with a registered Public Key: it combines `RSASSA_PSS_SHA256` and `ECDSA_SHA256`. It will depend on whether the given key is RSA or EC which policy will be applied.

  - ### Method Detail

    - #### values

          public static SigningPolicy[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (SigningPolicy c : SigningPolicy.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static SigningPolicy valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getKeyType

          public KeyType getKeyType()

    - #### getSignKeySize

          public int getSignKeySize()

    - #### getDigestAlgorithmOID

          public java.lang.String getDigestAlgorithmOID()

    - #### getSignatureAlgorithmName

          public java.lang.String getSignatureAlgorithmName()

    - #### getEncryptionAlgorithmOID

          @Deprecated
          public java.lang.String getEncryptionAlgorithmOID()

      Deprecated. Use `getEncryptionAlgorithmOIDs()`

    - #### getAltEncryptionAlgorithmOIDs

          @Deprecated
          public java.util.List<java.lang.String> getAltEncryptionAlgorithmOIDs()

      Deprecated. Use `getEncryptionAlgorithmOIDs()`

    - #### getEncryptionAlgorithmOIDs

          public java.util.Set<java.lang.String> getEncryptionAlgorithmOIDs()

    - #### getPolicyByKeyType

          public static SigningPolicy getPolicyByKeyType(SigningPolicy policy,
                                                         KeyType keyType)

    - #### getPolicySet

          public static java.util.Set<SigningPolicy> getPolicySet(SigningPolicy source)

Copyright © 2025 eHealth. All rights reserved.