Package org.apache.commons.crypto.cipher
Enum CryptoCipherFactory.CipherProvider
java.lang.Object
java.lang.Enum<CryptoCipherFactory.CipherProvider>
org.apache.commons.crypto.cipher.CryptoCipherFactory.CipherProvider
- All Implemented Interfaces:
Serializable
,Comparable<CryptoCipherFactory.CipherProvider>
- Enclosing class:
CryptoCipherFactory
public static enum CryptoCipherFactory.CipherProvider
extends Enum<CryptoCipherFactory.CipherProvider>
Defines the internal CryptoCipher implementations.
Usage:
props.setProperty(CryptoCipherFactory.CLASSES_KEY, CipherProvider.OPENSSL.getClassName()); props.setProperty(...); // if required by the implementation cipher = CryptoCipherFactory.getInstance(transformation, props);
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final Class
<? extends CryptoCipher> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CipherProvider
(Class<? extends CryptoCipher> klass) The private constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the class name of the provider.Class
<? extends CryptoCipher> Gets the implementation class of the provider.Returns the enum constant of this type with the specified name.static CryptoCipherFactory.CipherProvider[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
OPENSSL
The OpenSSL cipher implementation (using JNI)This implementation does not use any properties
-
JCE
The JCE cipher implementation from the JVMuses the property
CryptoCipherFactory.JCE_PROVIDER_KEY
to define the provider name, if present.
-
-
Field Details
-
klass
-
className
-
-
Constructor Details
-
CipherProvider
The private constructor.- Parameters:
klass
- the Class of CryptoCipher
-
-
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
-
getClassName
Gets the class name of the provider.- Returns:
- the fully qualified name of the provider class
-
getImplClass
Gets the implementation class of the provider.- Returns:
- the implementation class of the provider
-