Enum KeyPairGeneratorAlgorithm
- 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 DIFFIE_HELLMAN
The enum constant for DIFFIE_HELLMAN algorithm.DSA
The enum constant for DSA algorithm.EC
The enum constant for EC algorithm.RSA
The enum constant for RSA algorithm.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlgorithm()
Gets the algorithm for encryption or decryption.static KeyPairGeneratorAlgorithm
valueOf(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.
-
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.
-
-
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
-
getAlgorithm
public java.lang.String getAlgorithm()
Description copied from interface:Algorithm
Gets the algorithm for encryption or decryption.- Specified by:
getAlgorithm
in interfaceAlgorithm
- Returns:
- the algorithm
-
-