Class SimpleStringDigesterConfig
- java.lang.Object
-
- org.jasypt.digest.config.SimpleDigesterConfig
-
- org.jasypt.digest.config.SimpleStringDigesterConfig
-
- All Implemented Interfaces:
DigesterConfig
,StringDigesterConfig
public class SimpleStringDigesterConfig extends SimpleDigesterConfig implements StringDigesterConfig
Bean implementation for
StringDigesterConfig
. This class allows the values for the configuration parameters to be set via "standard" setX methods.For any of the configuration parameters, if its setX method is not called, a null value will be returned by the corresponding getX method.
- Since:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
prefix
private java.lang.String
stringOutputType
private java.lang.String
suffix
private java.lang.Boolean
unicodeNormalizationIgnored
-
Constructor Summary
Constructors Constructor Description SimpleStringDigesterConfig()
Creates a new SimpleStringDigesterConfig instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.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 anEncryptionOperationNotPossibleException
if not).java.lang.String
getStringOutputType()
This parameter lets the user specify the form in which String output will be encoded.java.lang.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 anEncryptionOperationNotPossibleException
if not).java.lang.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(java.lang.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 anEncryptionOperationNotPossibleException
if not).void
setStringOutputType(java.lang.String stringOutputType)
Sets the the form in which String output will be encoded.void
setSuffix(java.lang.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 anEncryptionOperationNotPossibleException
if not).void
setUnicodeNormalizationIgnored(java.lang.Boolean unicodeNormalizationIgnored)
Sets whether the unicode text normalization step should be ignored.void
setUnicodeNormalizationIgnored(java.lang.String unicodeNormalizationIgnored)
Sets whether the unicode text normalization step should be ignored.-
Methods inherited from class org.jasypt.digest.config.SimpleDigesterConfig
getAlgorithm, getInvertPositionOfPlainSaltInEncryptionResults, getInvertPositionOfSaltInMessageBeforeDigesting, getIterations, getPoolSize, getProvider, getProviderName, getSaltGenerator, getSaltSizeBytes, getUseLenientSaltSizeCheck, setAlgorithm, setInvertPositionOfPlainSaltInEncryptionResults, setInvertPositionOfSaltInMessageBeforeDigesting, setIterations, setIterations, setPoolSize, setPoolSize, setProvider, setProviderClassName, setProviderName, setSaltGenerator, setSaltGeneratorClassName, setSaltSizeBytes, setSaltSizeBytes, setUseLenientSaltSizeCheck
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jasypt.digest.config.DigesterConfig
getAlgorithm, getInvertPositionOfPlainSaltInEncryptionResults, getInvertPositionOfSaltInMessageBeforeDigesting, getIterations, getPoolSize, getProvider, getProviderName, getSaltGenerator, getSaltSizeBytes, getUseLenientSaltSizeCheck
-
-
-
-
Method Detail
-
setUnicodeNormalizationIgnored
public void setUnicodeNormalizationIgnored(java.lang.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.
Determines the result of:
isUnicodeNormalizationIgnored()
- Parameters:
unicodeNormalizationIgnored
- whether the unicode text normalization step should be ignored or not.
-
setUnicodeNormalizationIgnored
public void setUnicodeNormalizationIgnored(java.lang.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.
Determines the result of:
isUnicodeNormalizationIgnored()
- Parameters:
unicodeNormalizationIgnored
- whether the unicode text normalization step should be ignored or not.- Since:
- 1.4
-
setStringOutputType
public void setStringOutputType(java.lang.String stringOutputType)
Sets the the form in which String output will be encoded. Available encoding types are:
- base64 (default)
- hexadecimal
If not set, null will be returned.
Determines the result of:
getStringOutputType()
- Parameters:
stringOutputType
- the string output type.
-
setPrefix
public void setPrefix(java.lang.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()
- Parameters:
prefix
-- Since:
- 1.7
-
setSuffix
public void setSuffix(java.lang.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()
- Parameters:
suffix
-- Since:
- 1.7
-
isUnicodeNormalizationIgnored
public java.lang.Boolean isUnicodeNormalizationIgnored()
Description copied from interface: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.
- Specified by:
isUnicodeNormalizationIgnored
in interfaceStringDigesterConfig
- Returns:
- whether the unicode text normalization step should be ignored or not.
-
getStringOutputType
public java.lang.String getStringOutputType()
Description copied from interface:StringDigesterConfig
This parameter lets the user specify the form in which String output will be encoded. Available encoding types are:
- base64 (default)
- hexadecimal
- Specified by:
getStringOutputType
in interfaceStringDigesterConfig
- Returns:
- The name of the encoding type for String output
-
getPrefix
public java.lang.String getPrefix()
Description copied from interface: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).- Specified by:
getPrefix
in interfaceStringDigesterConfig
- Returns:
- the prefix to be added to all digests
-
getSuffix
public java.lang.String getSuffix()
Description copied from interface: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).- Specified by:
getSuffix
in interfaceStringDigesterConfig
- Returns:
- the suffix to be added to all digests
-
-