- java.lang.Object
-
- java.lang.Enum<CipherAlgorithm>
-
- io.github.astrapi69.crypt.api.algorithm.CipherAlgorithm
-
- All Implemented Interfaces:
Algorithm
,java.io.Serializable
,java.lang.Comparable<CipherAlgorithm>
public enum CipherAlgorithm extends java.lang.Enum<CipherAlgorithm> implements Algorithm
The enumCipherAlgorithm
that defines the names for the algorithm component in a transformation when requesting an instance of Cipher object
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AES
The enum constant for AES algorithm.AESWrap
The enum constant for AES algorithm.ARCFOUR
The enum constant for ARCFOUR algorithm.Blowfish
The Blowfish algorithm.ChaCha20
The ChaCha20 algorithm.ChaCha20_Poly1305
The ChaCha20-Poly1305 algorithm.DES
The DES algorithm.DESede
The DESede algorithm.DESedeWrap
The DESedeWrap algorithm.ECIES
The DESedeWrap algorithm.RC2
The RC2 algorithm.RC4
The RC4 algorithm.RC5
The RC5 algorithm.RSA
The enum constant for RSA algorithm.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AES_WRAP_ALGORITHM_NAME
The string constant AES_WRAP_ALGORITHM_NAMEstatic java.lang.String
CHA_CHA_20_ALGORITHM_NAME
The string constant CHA_CHA_20_ALGORITHM_NAMEstatic java.lang.String
CHA_CHA_20_POLY1305_ALGORITHM_NAME
The string constant CHA_CHA_20_ALGORITHM_NAMEstatic java.lang.String
DES_EDE_WRAP_ALGORITHM_NAME
The string constant DES_EDE_WRAP_ALGORITHM_NAMEstatic java.lang.String
ECIES_ALGORITHM_NAME
The string constant ECIES_ALGORITHM_NAMEstatic java.lang.String
RC2_ALGORITHM_NAME
The string constant RC2_ALGORITHM_NAMEstatic java.lang.String
RC4_ALGORITHM_NAME
The string constant RC4_ALGORITHM_NAMEstatic java.lang.String
RC5_ALGORITHM_NAME
The string constant RC5_ALGORITHM_NAME
-
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 decryptionstatic CipherAlgorithm
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CipherAlgorithm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AES
public static final CipherAlgorithm AES
The enum constant for AES algorithm.
-
AESWrap
public static final CipherAlgorithm AESWrap
The enum constant for AES algorithm.
-
ARCFOUR
public static final CipherAlgorithm ARCFOUR
The enum constant for ARCFOUR algorithm.
-
Blowfish
public static final CipherAlgorithm Blowfish
The Blowfish algorithm.
-
ChaCha20
public static final CipherAlgorithm ChaCha20
The ChaCha20 algorithm.
-
ChaCha20_Poly1305
public static final CipherAlgorithm ChaCha20_Poly1305
The ChaCha20-Poly1305 algorithm.
-
DES
public static final CipherAlgorithm DES
The DES algorithm.
-
DESede
public static final CipherAlgorithm DESede
The DESede algorithm.
-
DESedeWrap
public static final CipherAlgorithm DESedeWrap
The DESedeWrap algorithm.
-
ECIES
public static final CipherAlgorithm ECIES
The DESedeWrap algorithm.
-
RC2
public static final CipherAlgorithm RC2
The RC2 algorithm.
-
RC4
public static final CipherAlgorithm RC4
The RC4 algorithm.
-
RC5
public static final CipherAlgorithm RC5
The RC5 algorithm.
-
RSA
public static final CipherAlgorithm RSA
The enum constant for RSA algorithm.
-
-
Field Detail
-
AES_WRAP_ALGORITHM_NAME
public static final java.lang.String AES_WRAP_ALGORITHM_NAME
The string constant AES_WRAP_ALGORITHM_NAME- See Also:
- Constant Field Values
-
CHA_CHA_20_ALGORITHM_NAME
public static final java.lang.String CHA_CHA_20_ALGORITHM_NAME
The string constant CHA_CHA_20_ALGORITHM_NAME- See Also:
- Constant Field Values
-
CHA_CHA_20_POLY1305_ALGORITHM_NAME
public static final java.lang.String CHA_CHA_20_POLY1305_ALGORITHM_NAME
The string constant CHA_CHA_20_ALGORITHM_NAME- See Also:
- Constant Field Values
-
DES_EDE_WRAP_ALGORITHM_NAME
public static final java.lang.String DES_EDE_WRAP_ALGORITHM_NAME
The string constant DES_EDE_WRAP_ALGORITHM_NAME- See Also:
- Constant Field Values
-
ECIES_ALGORITHM_NAME
public static final java.lang.String ECIES_ALGORITHM_NAME
The string constant ECIES_ALGORITHM_NAME- See Also:
- Constant Field Values
-
RC2_ALGORITHM_NAME
public static final java.lang.String RC2_ALGORITHM_NAME
The string constant RC2_ALGORITHM_NAME- See Also:
- Constant Field Values
-
RC4_ALGORITHM_NAME
public static final java.lang.String RC4_ALGORITHM_NAME
The string constant RC4_ALGORITHM_NAME- See Also:
- Constant Field Values
-
RC5_ALGORITHM_NAME
public static final java.lang.String RC5_ALGORITHM_NAME
The string constant RC5_ALGORITHM_NAME- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static CipherAlgorithm[] 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 (CipherAlgorithm c : CipherAlgorithm.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CipherAlgorithm 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()
Gets the algorithm for encryption or decryption- Specified by:
getAlgorithm
in interfaceAlgorithm
- Returns:
- the algorithm
-
-