Enum EKeyAlgorithm

    • Enum Constant Detail

      • 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 Detail

      • values

        public static EKeyAlgorithm[] 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 (EKeyAlgorithm c : EKeyAlgorithm.values())
            System.out.println(c);
        
        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).