Package org.cryptacular.pbe
Enum OpenSSLAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<OpenSSLAlgorithm>
,java.lang.constant.Constable
Describes block ciphers allowed with the OpenSSL password-based encryption scheme.
- Author:
- Middleware Services
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAES-128 in CBC mode.AES-192 in CBC mode.AES-256 in CBC mode.DES in CBC mode.Triple DES in CBC mode.40-bit RC2 in CBC mode.64-bit RC2 in CBC mode.128-bit RC2 in CBC mode. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenSSLAlgorithm
fromAlgorithmId
(String algorithmId) Converts an OID to the corresponding algorithm specification.static OpenSSLAlgorithm
Returns the enum constant of this type with the specified name.static OpenSSLAlgorithm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AES_128_CBC
AES-128 in CBC mode. -
AES_192_CBC
AES-192 in CBC mode. -
AES_256_CBC
AES-256 in CBC mode. -
DES_CBC
DES in CBC mode. -
DES_EDE3_CBC
Triple DES in CBC mode. -
RC2_CBC
128-bit RC2 in CBC mode. -
RC2_40_CBC
40-bit RC2 in CBC mode. -
RC2_64_CBC
64-bit RC2 in CBC mode.
-
-
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
-
getAlgorithmId
- Returns:
- OpenSSL algorithm identifier, e.g. aes-128-cbc.
-
getCipherSpec
- Returns:
- Cipher algorithm specification.
-
fromAlgorithmId
Converts an OID to the corresponding algorithm specification.- Parameters:
algorithmId
- Algorithm OID.- Returns:
- Algorithm spec.
-