- java.lang.Object
-
- java.lang.Enum<KeyPairGeneratorAlgorithm>
-
- io.github.astrapi69.crypto.algorithm.KeyPairGeneratorAlgorithm
-
- All Implemented Interfaces:
Algorithm,java.io.Serializable,java.lang.Comparable<KeyPairGeneratorAlgorithm>
public enum KeyPairGeneratorAlgorithm extends java.lang.Enum<KeyPairGeneratorAlgorithm> implements Algorithm
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DHThe shortcut value for the enum constant for DIFFIE_HELLMAN algorithm.DIFFIE_HELLMANThe enum constant for DIFFIE_HELLMAN algorithm.DSAThe enum constant for DSA algorithm.ECThe enum constant for EC algorithm.RSAThe enum constant for RSA algorithm.RSASSA_PSSThe enum constant for RSA algorithm.UNKNOWN_TYPEThe enum constant if the algorithm type is unknown.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDH_ALGORITHM_NAMEThe string constant DH_ALGORITHM_NAME for the 'DH' and is a shortcut for 'DiffieHellman' algorithmstatic java.lang.StringDIFFIE_HELLMAN_ALGORITHM_NAMEThe string constant DIFFIE_HELLMAN_ALGORITHM_NAME for the 'DiffieHellman' algorithmstatic java.lang.StringDSA_ALGORITHM_NAMEThe string constant DSA_ALGORITHM_NAMEstatic java.lang.StringEC_ALGORITHM_NAMEThe string constant EC_ALGORITHM_NAMEstatic java.lang.StringRSA_ALGORITHM_NAMEThe string constant RSA_ALGORITHM_NAMEstatic java.lang.StringRSASSA_PSS_ALGORITHM_NAMEThe string constant RSAASSA_PSS_ALGORITHM_NAMEstatic java.lang.StringUNKNOWN_ALGORITHM_TYPEThe Constant UNKNOWN_ALGORITHM_TYPE is if the algorithm type is unknown.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAlgorithm()Gets the algorithm for encryption or decryption.static KeyPairGeneratorAlgorithmtoKeyPairGeneratorAlgorithm(java.lang.String algorithm)Transforms the given algorithm to the correspondingKeyPairGeneratorAlgorithmobjectstatic KeyPairGeneratorAlgorithmvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static KeyPairGeneratorAlgorithm[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DIFFIE_HELLMAN
public static final KeyPairGeneratorAlgorithm DIFFIE_HELLMAN
The enum constant for DIFFIE_HELLMAN algorithm.
-
DH
public static final KeyPairGeneratorAlgorithm DH
The shortcut value for the enum constant for DIFFIE_HELLMAN algorithm.
-
DSA
public static final KeyPairGeneratorAlgorithm DSA
The enum constant for DSA algorithm.
-
EC
public static final KeyPairGeneratorAlgorithm EC
The enum constant for EC algorithm.
-
RSA
public static final KeyPairGeneratorAlgorithm RSA
The enum constant for RSA algorithm.
-
RSASSA_PSS
public static final KeyPairGeneratorAlgorithm RSASSA_PSS
The enum constant for RSA algorithm.
-
UNKNOWN_TYPE
public static final KeyPairGeneratorAlgorithm UNKNOWN_TYPE
The enum constant if the algorithm type is unknown.
-
-
Field Detail
-
DIFFIE_HELLMAN_ALGORITHM_NAME
public static final java.lang.String DIFFIE_HELLMAN_ALGORITHM_NAME
The string constant DIFFIE_HELLMAN_ALGORITHM_NAME for the 'DiffieHellman' algorithm- See Also:
- Constant Field Values
-
DH_ALGORITHM_NAME
public static final java.lang.String DH_ALGORITHM_NAME
The string constant DH_ALGORITHM_NAME for the 'DH' and is a shortcut for 'DiffieHellman' algorithm- See Also:
- Constant Field Values
-
DSA_ALGORITHM_NAME
public static final java.lang.String DSA_ALGORITHM_NAME
The string constant DSA_ALGORITHM_NAME- See Also:
- Constant Field Values
-
EC_ALGORITHM_NAME
public static final java.lang.String EC_ALGORITHM_NAME
The string constant EC_ALGORITHM_NAME- See Also:
- Constant Field Values
-
RSA_ALGORITHM_NAME
public static final java.lang.String RSA_ALGORITHM_NAME
The string constant RSA_ALGORITHM_NAME- See Also:
- Constant Field Values
-
RSASSA_PSS_ALGORITHM_NAME
public static final java.lang.String RSASSA_PSS_ALGORITHM_NAME
The string constant RSAASSA_PSS_ALGORITHM_NAME- See Also:
- Constant Field Values
-
UNKNOWN_ALGORITHM_TYPE
public static final java.lang.String UNKNOWN_ALGORITHM_TYPE
The Constant UNKNOWN_ALGORITHM_TYPE is if the algorithm type is unknown.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static KeyPairGeneratorAlgorithm[] 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 (KeyPairGeneratorAlgorithm c : KeyPairGeneratorAlgorithm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyPairGeneratorAlgorithm 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 namejava.lang.NullPointerException- if the argument is null
-
toKeyPairGeneratorAlgorithm
public static KeyPairGeneratorAlgorithm toKeyPairGeneratorAlgorithm(java.lang.String algorithm)
Transforms the given algorithm to the correspondingKeyPairGeneratorAlgorithmobject- Parameters:
algorithm- the algorithm- Returns:
- the
KeyPairGeneratorAlgorithmobject or null if not found
-
getAlgorithm
public java.lang.String getAlgorithm()
Description copied from interface:AlgorithmGets the algorithm for encryption or decryption.- Specified by:
getAlgorithmin interfaceAlgorithm- Returns:
- the algorithm
-
-