public class EnvironmentStringDigesterConfig extends EnvironmentDigesterConfig implements StringDigesterConfig
Implementation for StringDigesterConfig
which can retrieve configuration
values from environment variables or system properties.
The name of the environment variable or system property (JVM property) to query for each parameter can be set with its corresponding setXEnvName or setXSysProperty method.
As this class extends SimpleDigesterConfig
, parameter values
can be also set with the usual setX methods.
For any of the configuration parameters, if its value is not configured in any way, a null value will be returned by the corresponding getX method.
Constructor and Description |
---|
EnvironmentStringDigesterConfig()
Creates a new EnvironmentStringDigesterConfig instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getPrefix()
Adds the returned (plain) prefix at the beginning of generated digests,
and also expects to find it in any plain message provided for matching
operations (raising an
EncryptionOperationNotPossibleException
if not). |
String |
getPrefixEnvName()
Retrieve the name of the environment variable which value has been
loaded as a value for the "prefix" parameter.
|
String |
getPrefixSysPropertyName()
Retrieve the name of the JVM system property which value has been
loaded as a value for the "prefix" parameter.
|
String |
getStringOutputType()
This parameter lets the user specify the form in which String output
will be encoded.
|
String |
getStringOutputTypeEnvName()
Retrieve the name of the environment variable which value has been
loaded as the String output type.
|
String |
getStringOutputTypeSysPropertyName()
Retrieve the name of the JVM system property which value has been
loaded as the String output type.
|
String |
getSuffix()
Adds the returned (plain) suffix at the end of generated digests,
and also expects to find it in any plain message provided for matching
operations (raising an
EncryptionOperationNotPossibleException
if not). |
String |
getSuffixEnvName()
Retrieve the name of the environment variable which value has been
loaded as a value for the "suffix" parameter.
|
String |
getSuffixSysPropertyName()
Retrieve the name of the JVM system property which value has been
loaded as a value for the "suffix" parameter.
|
String |
getUnicodeNormalizationIgnoredEnvName()
Retrieve the name of the environment variable which value has been
loaded as a value for the "unicode normalization ignored" parameter.
|
String |
getUnicodeNormalizationIgnoredSysPropertyName()
Retrieve the name of the JVM system property which value has been
loaded as a value for the "unicode normalization ignored" parameter.
|
Boolean |
isUnicodeNormalizationIgnored()
This parameter lets the user specify if the Unicode text normalization
step performed during String digest and matching should be ignored.
|
void |
setPrefix(String prefix)
Sets the prefix to be added at the beginning of encryption results, and also to
be expected at the beginning of plain messages provided for matching operations
(raising an
EncryptionOperationNotPossibleException if not). |
void |
setPrefixEnvName(String prefixEnvName)
Set the config object to use the specified environment variable to
load the value for the "prefix" parameter.
|
void |
setPrefixSysPropertyName(String prefixSysPropertyName)
Set the config object to use the specified JVM system property to
load a value for the "prefix" parameter.
|
void |
setStringOutputType(String stringOutputType)
Sets the the form in which String output
will be encoded.
|
void |
setStringOutputTypeEnvName(String stringOutputTypeEnvName)
Set the config object to use the specified environment variable to
load the value for the String output type.
|
void |
setStringOutputTypeSysPropertyName(String stringOutputTypeSysPropertyName)
Set the config object to use the specified JVM system property to
load the value for the String output type.
|
void |
setSuffix(String suffix)
Sets the suffix to be added at the end of encryption results, and also to
be expected at the end of plain messages provided for matching operations
(raising an
EncryptionOperationNotPossibleException if not). |
void |
setSuffixEnvName(String suffixEnvName)
Set the config object to use the specified environment variable to
load the value for the "suffix" parameter.
|
void |
setSuffixSysPropertyName(String suffixSysPropertyName)
Set the config object to use the specified JVM system property to
load a value for the "suffix" parameter.
|
void |
setUnicodeNormalizationIgnored(Boolean unicodeNormalizationIgnored)
Sets whether the unicode text normalization step should be ignored.
|
void |
setUnicodeNormalizationIgnored(String unicodeNormalizationIgnored)
Sets whether the unicode text normalization step should be ignored.
|
void |
setUnicodeNormalizationIgnoredEnvName(String unicodeNormalizationIgnoredEnvName)
Set the config object to use the specified environment variable to
load the value for the "unicode normalization ignored" parameter.
|
void |
setUnicodeNormalizationIgnoredSysPropertyName(String unicodeNormalizationIgnoredSysPropertyName)
Set the config object to use the specified JVM system property to
load a value for the "unicode normalization ignored" parameter.
|
getAlgorithmEnvName, getAlgorithmSysPropertyName, getInvertPositionOfPlainSaltInEncryptionResultsEnvName, getInvertPositionOfPlainSaltInEncryptionResultsSysPropertyName, getInvertPositionOfSaltInMessageBeforeDigestingEnvName, getInvertPositionOfSaltInMessageBeforeDigestingSysPropertyName, getIterationsEnvName, getIterationsSysPropertyName, getPoolSizeEnvName, getPoolSizeSysPropertyName, getProviderClassNameEnvName, getProviderClassNameSysPropertyName, getProviderNameEnvName, getProviderNameSysPropertyName, getSaltGeneratorClassNameEnvName, getSaltGeneratorClassNameSysPropertyName, getSaltSizeBytesEnvName, getSaltSizeBytesSysPropertyName, getUseLenientSaltSizeCheckEnvName, getUseLenientSaltSizeCheckSysPropertyName, setAlgorithm, setAlgorithmEnvName, setAlgorithmSysPropertyName, setInvertPositionOfPlainSaltInEncryptionResults, setInvertPositionOfPlainSaltInEncryptionResultsEnvName, setInvertPositionOfPlainSaltInEncryptionResultsSysPropertyName, setInvertPositionOfSaltInMessageBeforeDigesting, setInvertPositionOfSaltInMessageBeforeDigestingEnvName, setInvertPositionOfSaltInMessageBeforeDigestingSysPropertyName, setIterations, setIterations, setIterationsEnvName, setIterationsSysPropertyName, setPoolSize, setPoolSize, setPoolSizeEnvName, setPoolSizeSysPropertyName, setProvider, setProviderClassName, setProviderClassNameEnvName, setProviderClassNameSysPropertyName, setProviderName, setProviderNameEnvName, setProviderNameSysPropertyName, setSaltGenerator, setSaltGeneratorClassName, setSaltGeneratorClassNameEnvName, setSaltGeneratorClassNameSysPropertyName, setSaltSizeBytes, setSaltSizeBytes, setSaltSizeBytesEnvName, setSaltSizeBytesSysPropertyName, setUseLenientSaltSizeCheck, setUseLenientSaltSizeCheckEnvName, setUseLenientSaltSizeCheckSysPropertyName
getAlgorithm, getInvertPositionOfPlainSaltInEncryptionResults, getInvertPositionOfSaltInMessageBeforeDigesting, getIterations, getPoolSize, getProvider, getProviderName, getSaltGenerator, getSaltSizeBytes, getUseLenientSaltSizeCheck
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlgorithm, getInvertPositionOfPlainSaltInEncryptionResults, getInvertPositionOfSaltInMessageBeforeDigesting, getIterations, getPoolSize, getProvider, getProviderName, getSaltGenerator, getSaltSizeBytes, getUseLenientSaltSizeCheck
public EnvironmentStringDigesterConfig()
Creates a new EnvironmentStringDigesterConfig instance.
public String getUnicodeNormalizationIgnoredEnvName()
public void setUnicodeNormalizationIgnoredEnvName(String unicodeNormalizationIgnoredEnvName)
unicodeNormalizationIgnoredEnvName
- the name of the environment
variablepublic String getUnicodeNormalizationIgnoredSysPropertyName()
public void setUnicodeNormalizationIgnoredSysPropertyName(String unicodeNormalizationIgnoredSysPropertyName)
unicodeNormalizationIgnoredSysPropertyName
- the name of the propertypublic String getStringOutputTypeEnvName()
public void setStringOutputTypeEnvName(String stringOutputTypeEnvName)
stringOutputTypeEnvName
- the name of the environment variablepublic String getStringOutputTypeSysPropertyName()
public void setStringOutputTypeSysPropertyName(String stringOutputTypeSysPropertyName)
stringOutputTypeSysPropertyName
- the name of the propertypublic void setUnicodeNormalizationIgnored(Boolean unicodeNormalizationIgnored)
Sets whether the unicode text normalization step should be ignored.
The Java Virtual Machine internally handles all Strings as UNICODE. When digesting or matching digests in jasypt, these Strings are first normalized to its NFC form so that digest matching is not affected by the specific form in which the messages where input.
It is normally safe (and recommended) to leave this parameter set to its default FALSE value (and thus DO perform normalization operations). But in some specific cases in which issues with legacy software could arise, it might be useful to set this to TRUE.
For more information on unicode text normalization, see this issue of Core Java Technologies Tech Tips.
If not set, null will be returned.
unicodeNormalizationIgnored
- whether the unicode text
normalization step should be ignored or not.public void setUnicodeNormalizationIgnored(String unicodeNormalizationIgnored)
Sets whether the unicode text normalization step should be ignored.
The Java Virtual Machine internally handles all Strings as UNICODE. When digesting or matching digests in jasypt, these Strings are first normalized to its NFC form so that digest matching is not affected by the specific form in which the messages where input.
It is normally safe (and recommended) to leave this parameter set to its default FALSE value (and thus DO perform normalization operations). But in some specific cases in which issues with legacy software could arise, it might be useful to set this to TRUE.
For more information on unicode text normalization, see this issue of Core Java Technologies Tech Tips.
If not set, null will be returned.
unicodeNormalizationIgnored
- whether the unicode text
normalization step should be ignored or not.public void setStringOutputType(String stringOutputType)
Sets the the form in which String output will be encoded. Available encoding types are:
If not set, null will be returned.
stringOutputType
- the string output type.public void setPrefix(String prefix)
Sets the prefix to be added at the beginning of encryption results, and also to
be expected at the beginning of plain messages provided for matching operations
(raising an EncryptionOperationNotPossibleException
if not).
If not set, null will be returned.
Determines the result of: getPrefix()
prefix
- public void setSuffix(String suffix)
Sets the suffix to be added at the end of encryption results, and also to
be expected at the end of plain messages provided for matching operations
(raising an EncryptionOperationNotPossibleException
if not).
If not set, null will be returned.
Determines the result of: getSuffix()
suffix
- public Boolean isUnicodeNormalizationIgnored()
StringDigesterConfig
This parameter lets the user specify if the Unicode text normalization step performed during String digest and matching should be ignored.
The Java Virtual Machine internally handles all Strings as UNICODE. When digesting or matching digests in jasypt, these Strings are first normalized to its NFC form so that digest matching is not affected by the specific form in which the messages where input.
It is normally safe (and recommended) to leave this parameter set to its default FALSE value (and thus DO perform normalization operations). But in some specific cases in which issues with legacy software could arise, it might be useful to set this to TRUE.
For more information on unicode text normalization, see this issue of Core Java Technologies Tech Tips.
isUnicodeNormalizationIgnored
in interface StringDigesterConfig
public String getStringOutputType()
StringDigesterConfig
This parameter lets the user specify the form in which String output will be encoded. Available encoding types are:
getStringOutputType
in interface StringDigesterConfig
public String getPrefix()
StringDigesterConfig
Adds the returned (plain) prefix at the beginning of generated digests,
and also expects to find it in any plain message provided for matching
operations (raising an EncryptionOperationNotPossibleException
if not).
getPrefix
in interface StringDigesterConfig
public String getSuffix()
StringDigesterConfig
Adds the returned (plain) suffix at the end of generated digests,
and also expects to find it in any plain message provided for matching
operations (raising an EncryptionOperationNotPossibleException
if not).
getSuffix
in interface StringDigesterConfig
public String getPrefixEnvName()
public void setPrefixEnvName(String prefixEnvName)
prefixEnvName
- the name of the environment
variablepublic String getPrefixSysPropertyName()
public void setPrefixSysPropertyName(String prefixSysPropertyName)
prefixSysPropertyName
- the name of the propertypublic String getSuffixEnvName()
public void setSuffixEnvName(String suffixEnvName)
suffixEnvName
- the name of the environment
variablepublic String getSuffixSysPropertyName()
public void setSuffixSysPropertyName(String suffixSysPropertyName)
suffixSysPropertyName
- the name of the propertyCopyright © 2017 JBoss by Red Hat. All rights reserved.