public final class ConfigurerUtil extends Object
Encryptor using a Properties object for
configuration.| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_ALGORITHM
Property key for the encryption algorithm to be used to configure the
Encryptor. |
static String |
KEY_BLOCK_MODE
Property key for the block mode to be used with the encryption algorithm.
|
static String |
KEY_BLOCK_SIZE
Property key for the block size to be used with the encryption algorithm.
|
static String |
KEY_CHARSET
Property key for the full class name of the
TextEncoder to be used with the Encryptor. |
static String |
KEY_CIPHER_KEY
Property key for the encryption key to be used to configure the
Encryptor. |
static String |
KEY_COMPRESS_LOB
Property key for enabling compression of LOB data.
|
static String |
KEY_DECRYPTION_KEY
Property key for the encryption key to be used to configure the
Encryptor. |
static String |
KEY_ENCODER_CLASS
Property key for the full class name of the
TextEncoder to be used with the Encryptor. |
static String |
KEY_ENCRYPTION_KEY
Property key for the encryption key to be used to configure the
Encryptor. |
static String |
KEY_ENCRYPTOR_STORE_KEY
Property key for the
EncryptorStore key which maps to a code-configured Encryptor. |
static String |
KEY_GCM_TAG_LEN
Property key for the Authentication Tag length in bits to be used with the encryption algorithm in GCM block mode.
|
static String |
KEY_ITERATION_COUNT
Property key for the number of PBE iterations to be used with a PBE algorithm.
|
static String |
KEY_KEY_LOADER
Property key for the encryption KeyLoader to be used to configure the
Encryptor. |
static String |
KEY_MAC_ALGORITHM
Property key for the MAC algorithm to be used to configure the
Encryptor. |
static String |
KEY_MAC_KEY
Property key for the MAC key to be used to configure the
Encryptor. |
static String |
KEY_MAC_KEY_LOADER
Property key for the MAC KeyLoader to be used to configure the
Encryptor. |
static String |
KEY_MAX_IN_MEM_BUFF_SIZE
Property key that controls the maxmimum in-memory buffer size used in LOB-type streaming in pre-JDBC4
environments.
|
static String |
KEY_PADDING
Property key for the padding to be used with the encryption algorithm.
|
static String |
KEY_PARAM_CLASS
Property key for the full class name of the algorithm parameter class to be used to configure the
Encryptor. |
static String |
KEY_PARAM_ENCODER_CLASS
Property key for the full class name of the
TextEncoder to be used with the algorithm parameter object. |
static String |
KEY_PROPERTY_PREFIX
Property key for the prefix to be used to lookup configuration settings within the system properties.
|
static String |
KEY_PROVIDER_CLASS
Property key for the JCE provider class to be used with the
Encryptor. |
static String |
KEY_PROVIDER_NAME
Property key for the JCE provider name to be used with the
Encryptor. |
static String |
KEY_PSWD_ENCODER_CLASS
Property key for the full class name of the
ConfigurablePasswordEncoder to
be used with the EncodedPasswordType. |
static String |
KEY_PSWD_ENCODER_STORE_EXPORT_KEY
Property key for the key to be used to export the
ConfigurablePasswordEncoder into the
PasswordEncoderStore. |
static String |
KEY_SALT_GENERATOR
Property key for the
SaltGenerator to be used to configure the Encryptor. |
static String |
KEY_SALT_MATCHER
Property key for the
SaltMatcher to be used to configure the Encryptor. |
static String |
KEY_SALT_SIZE
Property key for the salt size (in bytes) to be used with a PBE algorithm.
|
static String |
KEY_STREAM_BUFF_SIZE
Property key that controls in-memory buffer size used in LOB-type streaming in pre-JDBC4 environments.
|
static String |
KEY_STREAM_LOBS
Property key for enabling streaming of LOB data.
|
| Modifier and Type | Method and Description |
|---|---|
static Encryptor |
configureEncryptor(Properties properties)
Loads and configures an encryptor based on settings within the given properties.
|
static Encryptor |
configureEncryptor(Properties properties,
String prefix)
Loads and configures an encryptor based on settings within the given properties.
|
static ConfigurablePasswordEncoder |
configurePswdEncoder(Properties properties)
Loads and configures a
ConfigurablePasswordEncoder based on settings within the given properties. |
static ConfigurablePasswordEncoder |
configurePswdEncoder(Properties properties,
String prefix)
Loads and configures a
ConfigurablePasswordEncoder based on settings within the given properties. |
static Cipher |
getCipherInstance(AlgorithmParameters<?> parameters)
Returns a
Cipher instance for the given AlgorithmParameters. |
static AlgorithmParameters<?> |
loadAlgorithmParameters(Properties parameters,
String prefix)
Loads an AlgorithmParameters instance for the given encryption configuration parameters.
|
static Integer |
parseInt(String value)
Parses the given string as an integer.
|
public static final String KEY_PROPERTY_PREFIX
public static final String KEY_ENCRYPTOR_STORE_KEY
EncryptorStore key which maps to a code-configured Encryptor.public static final String KEY_ENCODER_CLASS
TextEncoder to be used with the Encryptor.public static final String KEY_CHARSET
TextEncoder to be used with the Encryptor.public static final String KEY_PARAM_CLASS
Encryptor.public static final String KEY_PARAM_ENCODER_CLASS
TextEncoder to be used with the algorithm parameter object.public static final String KEY_CIPHER_KEY
Encryptor.public static final String KEY_KEY_LOADER
Encryptor.public static final String KEY_ENCRYPTION_KEY
Encryptor.public static final String KEY_DECRYPTION_KEY
Encryptor.public static final String KEY_ALGORITHM
Encryptor.public static final String KEY_PROVIDER_NAME
Encryptor.public static final String KEY_PROVIDER_CLASS
Encryptor.public static final String KEY_MAC_KEY
Encryptor.public static final String KEY_MAC_KEY_LOADER
Encryptor.public static final String KEY_MAC_ALGORITHM
Encryptor.public static final String KEY_SALT_GENERATOR
SaltGenerator to be used to configure the Encryptor.public static final String KEY_SALT_MATCHER
SaltMatcher to be used to configure the Encryptor.public static final String KEY_BLOCK_MODE
public static final String KEY_BLOCK_SIZE
public static final String KEY_GCM_TAG_LEN
public static final String KEY_PADDING
public static final String KEY_SALT_SIZE
public static final String KEY_ITERATION_COUNT
public static final String KEY_COMPRESS_LOB
AbstractLobType.public static final String KEY_STREAM_LOBS
AbstractLobType.public static final String KEY_STREAM_BUFF_SIZE
AbstractLobType.public static final String KEY_MAX_IN_MEM_BUFF_SIZE
AbstractLobType.public static final String KEY_PSWD_ENCODER_CLASS
ConfigurablePasswordEncoder to
be used with the EncodedPasswordType.public static final String KEY_PSWD_ENCODER_STORE_EXPORT_KEY
ConfigurablePasswordEncoder into the
PasswordEncoderStore. This allows the application to easily reference the password encoder.public static Encryptor configureEncryptor(Properties properties) throws EncryptorConfigurationException
properties - the properties with encryptor settingsEncryptorConfigurationException - an error was found with the given configurationpublic static Encryptor configureEncryptor(Properties properties, String prefix) throws EncryptorConfigurationException
properties - the properties with encryptor settingsprefix - prefix to be used with the property keysEncryptorConfigurationException - an error was found with the given configurationpublic static AlgorithmParameters<?> loadAlgorithmParameters(Properties parameters, String prefix) throws EncryptorConfigurationException
parameters - the encryption configuration parametersprefix - the property key prefix (may be null)EncryptorConfigurationException - an error was found with the given configurationpublic static ConfigurablePasswordEncoder configurePswdEncoder(Properties properties) throws EncryptorConfigurationException
ConfigurablePasswordEncoder based on settings within the given properties.properties - the properties with password encoder settingsConfigurablePasswordEncoder based on settings within the given propertiesEncryptorConfigurationException - an error was found with the given configurationpublic static ConfigurablePasswordEncoder configurePswdEncoder(Properties properties, String prefix) throws EncryptorConfigurationException
ConfigurablePasswordEncoder based on settings within the given properties.
The prefix is prepended on each of the property keys.properties - the properties with password encoder settingsprefix - prefix to be used with the property keysConfigurablePasswordEncoder based on settings within the given propertiesEncryptorConfigurationException - an error was found with the given configurationpublic static Cipher getCipherInstance(AlgorithmParameters<?> parameters) throws GeneralSecurityException
Cipher instance for the given AlgorithmParameters.parameters - the AlgorithmParametersCipher instance for the given AlgorithmParametersGeneralSecurityException - GeneralSecurityException