- All Implemented Interfaces:
Algorithm
,Serializable
,Comparable<CompoundAlgorithm>
,Constable
The enum
CompoundAlgorithm
provides some compound algorithms-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe enum constant for the 'PBEWithMD5AndAES' algorithmThe enum constant for the 'PBEWithMD5AndDES' algorithmThe enum constant for the 'PBEWITHSHA1AND128BITAES-CBC-BC' algorithmThe enum constant for the 'PBEWithSHA1AndDESede' algorithmThe enum constant for the 'PBKDF2WithHmacSHA1' algorithmThe enum constant for the 'SHA1withRSA' algorithmThe enum constant for the 'SHA256withRSA' algorithmThe enum constant for the 'SHA384withRSA' algorithmThe enum constant for the 'SHA512withRSA' algorithmThe enum constant 'UNKNOWN' if the compound algorithm is unknown -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant for the default iteration count.static final String
Constant for the default passwordstatic final String
Deprecated.use instead the new constant PASSWORD.static final byte[]
Constant array for the default contents of saltFields inherited from interface io.github.astrapi69.crypt.api.algorithm.Algorithm
UNKNOWN_ALGORITHM_NAME
-
Method Summary
Modifier and TypeMethodDescriptionGets the algorithm for encryption or decryptiontoString()
static CompoundAlgorithm
Returns the enum constant of this class with the specified name.static CompoundAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PBE_WITH_MD5_AND_AES
The enum constant for the 'PBEWithMD5AndAES' algorithm -
PBE_WITH_MD5_AND_DES
The enum constant for the 'PBEWithMD5AndDES' algorithm -
PBE_WITH_SHA1_AND_128BIT_AES_CBC_BC
The enum constant for the 'PBEWITHSHA1AND128BITAES-CBC-BC' algorithm -
PBE_WITH_SHA1_AND_DES_EDE
The enum constant for the 'PBEWithSHA1AndDESede' algorithm -
PBKDF2_WITH_HMAC_SHA1
The enum constant for the 'PBKDF2WithHmacSHA1' algorithm -
SHA1_WITH_RSA
The enum constant for the 'SHA1withRSA' algorithm -
SHA256_WITH_RSA
The enum constant for the 'SHA256withRSA' algorithm -
SHA384_WITH_RSA
The enum constant for the 'SHA384withRSA' algorithm -
SHA512_WITH_RSA
The enum constant for the 'SHA512withRSA' algorithm -
UNKNOWN
The enum constant 'UNKNOWN' if the compound algorithm is unknown
-
-
Field Details
-
ITERATIONCOUNT
public static final int ITERATIONCOUNTConstant for the default iteration count.- See Also:
-
PRIVATE_KEY
Deprecated.use instead the new constant PASSWORD. Will be removed in the next major versionConstant for the default private key- See Also:
-
PASSWORD
Constant for the default password- See Also:
-
SALT
public static final byte[] SALTConstant array for the default contents of salt
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getAlgorithm
Gets the algorithm for encryption or decryption- Specified by:
getAlgorithm
in interfaceAlgorithm
- Returns:
- the algorithm
-
toString
- Overrides:
toString
in classEnum<CompoundAlgorithm>
-