Enum EKeyAlgorithm
- All Implemented Interfaces:
Serializable, Comparable<EKeyAlgorithm>
The algorithm used for generating a key pair.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic EKeyAlgorithmfromString(String algorithm, EKeyAlgorithm defaultAlgorithm) Returns the algorithm for the given string.Additional key specifications for this algorithm.intThe default key size for this algorithm.The default signature type for this algorithm.getDescription(Locale locale) Returns a description of this algorithm in the given locale.getDisplayName(Locale locale) Returns the display name of this algorithm in the given locale.getKeySpec(int keySize) intThe maximum key size for this algorithm.The minimum key size for this algorithm.static Set<EKeyAlgorithm> Returns a set of all key algorithm names.The supported key sizes for this algorithm, that are considered secure.The supported signature types for this algorithm.static EKeyAlgorithmReturns the enum constant of this type with the specified name.static EKeyAlgorithm[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
RSA
Rivest–Shamir–Adleman (RSA) algorithm. -
DSA
Digital Signature Algorithm (DSA) algorithm. -
EC
Elliptic curve (EC) algorithm.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromString
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
Returns a set of all key algorithm names.- Returns:
- A set of all key algorithm names.
-
getDescription
-
getDisplayName
-
getKeySpec
-
getMaxKeySize
public int getMaxKeySize()The maximum key size for this algorithm. This is the largest key size that is considered secure. -
getSupportedKeySizes
-
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
The default signature type for this algorithm. -
getSupportedSignatureTypes
The supported signature types for this algorithm. -
getAdditionalKeySpecs
-