Enum EKeyAlgorithm

java.lang.Object
java.lang.Enum<EKeyAlgorithm>
de.xima.fc.certificate.mgmt.key.EKeyAlgorithm
All Implemented Interfaces:
Serializable, Comparable<EKeyAlgorithm>

public enum EKeyAlgorithm extends Enum<EKeyAlgorithm> implements Serializable
The algorithm used for generating a key pair.
  • Enum Constant Details

    • RSA

      public static final EKeyAlgorithm RSA
      Rivest–Shamir–Adleman (RSA) algorithm.
    • DSA

      public static final EKeyAlgorithm DSA
      Digital Signature Algorithm (DSA) algorithm.
    • EC

      public static final EKeyAlgorithm EC
      Elliptic curve (EC) algorithm.
  • Method Details

    • values

      public static EKeyAlgorithm[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EKeyAlgorithm valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public static EKeyAlgorithm fromString(String algorithm, EKeyAlgorithm defaultAlgorithm)
      Returns the algorithm for the given string. If the string is blank or invalid, the default algorithm is returned.
      Parameters:
      algorithm - The algorithm as a string.
      defaultAlgorithm - The default algorithm to return if the string is blank or invalid.
      Returns:
      The algorithm for the given string, or the default algorithm if the string is blank or invalid.
    • getSecureKeyAlgorithms

      public static Set<EKeyAlgorithm> getSecureKeyAlgorithms()
      Returns a set of all key algorithm names.
      Returns:
      A set of all key algorithm names.
    • getDescription

      public String getDescription(Locale locale)
      Returns a description of this algorithm in the given locale.
      Parameters:
      locale - The locale to use for localization.
      Returns:
      A description of this algorithm in the given locale.
    • getDisplayName

      public String getDisplayName(Locale locale)
      Returns the display name of this algorithm in the given locale.
      Parameters:
      locale - The locale to use for localization.
      Returns:
      The display name of this algorithm in the given locale.
    • getKeySpec

      public String getKeySpec(int keySize)
    • getMaxKeySize

      public int getMaxKeySize()
      The maximum key size for this algorithm. This is the largest key size that is considered secure.
    • getSupportedKeySizes

      public List<Integer> getSupportedKeySizes()
      The supported key sizes for this algorithm, that are considered secure.
    • getMinKeySize

      public Integer getMinKeySize()
      The minimum key size for this algorithm. This is the smallest key size that is considered secure.
    • getDefaultKeySize

      public int getDefaultKeySize()
      The default key size for this algorithm.
    • getDefaultSignatureType

      public ESignatureType getDefaultSignatureType()
      The default signature type for this algorithm.
    • getSupportedSignatureTypes

      public Set<ESignatureType> getSupportedSignatureTypes()
      The supported signature types for this algorithm.
    • getAdditionalKeySpecs

      public Map<Integer,String> getAdditionalKeySpecs()
      Additional key specifications for this algorithm. The key is the key size, the value is some additional information (e.g. the curve for ECDSA).