Class EnvironmentDigesterConfig
- java.lang.Object
-
- org.jasypt.digest.config.SimpleDigesterConfig
-
- org.jasypt.digest.config.EnvironmentDigesterConfig
-
- All Implemented Interfaces:
DigesterConfig
- Direct Known Subclasses:
EnvironmentStringDigesterConfig
public class EnvironmentDigesterConfig extends SimpleDigesterConfig
Implementation for
DigesterConfig
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.
- Since:
- 1.1
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description EnvironmentDigesterConfig()
Creates a new EnvironmentDigesterConfig instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlgorithmEnvName()
Retrieve the name of the environment variable which value has been loaded as the algorithm.java.lang.String
getAlgorithmSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the algorithm.java.lang.String
getInvertPositionOfPlainSaltInEncryptionResultsEnvName()
Retrieve the name of the environment variable which value has been loaded as the value for the invertPositionOfPlainSaltInEncryptionResults property.java.lang.String
getInvertPositionOfPlainSaltInEncryptionResultsSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the value for the invertPositionOfPlainSaltInEncryptionResults property.java.lang.String
getInvertPositionOfSaltInMessageBeforeDigestingEnvName()
Retrieve the name of the environment variable which value has been loaded as the value for the invertPositionOfSaltInMessageBeforeDigesting property.java.lang.String
getInvertPositionOfSaltInMessageBeforeDigestingSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the value for the invertPositionOfSaltInMessageBeforeDigesting property.java.lang.String
getIterationsEnvName()
Retrieve the name of the environment variable which value has been loaded as the iteration count.java.lang.String
getIterationsSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the iteration count.java.lang.String
getPoolSizeEnvName()
Retrieve the name of the environment variable which value has been loaded as the value for the poolSize property.java.lang.String
getPoolSizeSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the value for the poolSize property.java.lang.String
getProviderClassNameEnvName()
Retrieve the name of the environment variable which value has been loaded as the provider class name.java.lang.String
getProviderClassNameSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the provider class name.java.lang.String
getProviderNameEnvName()
Retrieve the name of the environment variable which value has been loaded as the provider name.java.lang.String
getProviderNameSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the provider name.java.lang.String
getSaltGeneratorClassNameEnvName()
Retrieve the name of the environment variable which value has been loaded as the salt generator class name.java.lang.String
getSaltGeneratorClassNameSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the salt generator class name.java.lang.String
getSaltSizeBytesEnvName()
Retrieve the name of the environment variable which value has been loaded as the salt size in bytes.java.lang.String
getSaltSizeBytesSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the salt size in bytes.java.lang.String
getUseLenientSaltSizeCheckEnvName()
Retrieve the name of the environment variable which value has been loaded as the value for the useLenientSaltSizeCheck property.java.lang.String
getUseLenientSaltSizeCheckSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the value for the useLenientSaltSizeCheck property.void
setAlgorithm(java.lang.String algorithm)
Sets the name of the algorithm.void
setAlgorithmEnvName(java.lang.String algorithmEnvName)
Set the config object to use the specified environment variable to load the value for the algorithm.void
setAlgorithmSysPropertyName(java.lang.String algorithmSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the algorithm.void
setInvertPositionOfPlainSaltInEncryptionResults(java.lang.Boolean invertPositionOfPlainSaltInEncryptionResults)
Whether the plain (not hashed) salt bytes are to be appended after the digest operation result bytes.void
setInvertPositionOfPlainSaltInEncryptionResultsEnvName(java.lang.String invertPositionOfPlainSaltInEncryptionResultsEnvName)
Set the config object to use the specified environment variable to load the value for the invertPositionOfPlainSaltInEncryptionResults property.void
setInvertPositionOfPlainSaltInEncryptionResultsSysPropertyName(java.lang.String invertPositionOfPlainSaltInEncryptionResultsSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the invertPositionOfPlainSaltInEncryptionResults property.void
setInvertPositionOfSaltInMessageBeforeDigesting(java.lang.Boolean invertPositionOfSaltInMessageBeforeDigesting)
Whether the salt bytes are to be appended after the message ones before performing the digest operation on the whole.void
setInvertPositionOfSaltInMessageBeforeDigestingEnvName(java.lang.String invertPositionOfSaltInMessageBeforeDigestingEnvName)
Set the config object to use the specified environment variable to load the value for the invertPositionOfSaltInMessageBeforeDigesting property.void
setInvertPositionOfSaltInMessageBeforeDigestingSysPropertyName(java.lang.String invertPositionOfSaltInMessageBeforeDigestingSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the invertPositionOfSaltInMessageBeforeDigesting property.void
setIterations(java.lang.Integer iterations)
Sets the number of hashing iterations.void
setIterations(java.lang.String iterations)
Sets the number of hashing iterations.void
setIterationsEnvName(java.lang.String iterationsEnvName)
Set the config object to use the specified environment variable to load the value for the iteration count.void
setIterationsSysPropertyName(java.lang.String iterationsSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the iteration count.void
setPoolSize(java.lang.Integer poolSize)
Sets the size of the pool of digesters to be created.void
setPoolSize(java.lang.String poolSize)
Sets the size of the pool of digesters to be created.void
setPoolSizeEnvName(java.lang.String poolSizeEnvName)
Set the config object to use the specified environment variable to load the value for the poolSize property.void
setPoolSizeSysPropertyName(java.lang.String poolSizeSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the useLenientSaltSizeCheck property.void
setProvider(java.security.Provider provider)
Sets the security provider to be used for obtaining the digest algorithm.void
setProviderClassName(java.lang.String providerClassName)
Sets the class name for the security provider to be used for obtaining the digest algorithm.void
setProviderClassNameEnvName(java.lang.String providerClassNameEnvName)
Set the config object to use the specified environment variable to load the value for the provider class name.void
setProviderClassNameSysPropertyName(java.lang.String providerClassNameSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the provider class name.void
setProviderName(java.lang.String providerName)
Sets the name of the security provider to be asked for the digest algorithm.void
setProviderNameEnvName(java.lang.String providerNameEnvName)
Set the config object to use the specified environment variable to load the value for the provider name.void
setProviderNameSysPropertyName(java.lang.String providerNameSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the provider name.void
setSaltGenerator(SaltGenerator saltGenerator)
Sets the salt generator.void
setSaltGeneratorClassName(java.lang.String saltGeneratorClassName)
Sets the class name of the salt generator.void
setSaltGeneratorClassNameEnvName(java.lang.String saltGeneratorClassNameEnvName)
Set the config object to use the specified environment variable to load the value for the salt generator class name.void
setSaltGeneratorClassNameSysPropertyName(java.lang.String saltGeneratorClassNameSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the salt generator class name.void
setSaltSizeBytes(java.lang.Integer saltSizeBytes)
Size in bytes of the salt to be used.void
setSaltSizeBytes(java.lang.String saltSizeBytes)
Size in bytes of the salt to be used.void
setSaltSizeBytesEnvName(java.lang.String saltSizeBytesEnvName)
Set the config object to use the specified environment variable to load the value for the salt size in bytes.void
setSaltSizeBytesSysPropertyName(java.lang.String saltSizeBytesSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the salt size in bytes.void
setUseLenientSaltSizeCheck(java.lang.Boolean useLenientSaltSizeCheck)
Whether digest matching operations will allow matching digests with a salt size different to the one configured in the "saltSizeBytes" property.void
setUseLenientSaltSizeCheckEnvName(java.lang.String useLenientSaltSizeCheckEnvName)
Set the config object to use the specified environment variable to load the value for the useLenientSaltSizeCheck property.void
setUseLenientSaltSizeCheckSysPropertyName(java.lang.String useLenientSaltSizeCheckSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the useLenientSaltSizeCheck property.-
Methods inherited from class org.jasypt.digest.config.SimpleDigesterConfig
getAlgorithm, getInvertPositionOfPlainSaltInEncryptionResults, getInvertPositionOfSaltInMessageBeforeDigesting, getIterations, getPoolSize, getProvider, getProviderName, getSaltGenerator, getSaltSizeBytes, getUseLenientSaltSizeCheck
-
-
-
-
Field Detail
-
algorithmEnvName
private java.lang.String algorithmEnvName
-
iterationsEnvName
private java.lang.String iterationsEnvName
-
saltSizeBytesEnvName
private java.lang.String saltSizeBytesEnvName
-
saltGeneratorClassNameEnvName
private java.lang.String saltGeneratorClassNameEnvName
-
providerNameEnvName
private java.lang.String providerNameEnvName
-
providerClassNameEnvName
private java.lang.String providerClassNameEnvName
-
invertPositionOfSaltInMessageBeforeDigestingEnvName
private java.lang.String invertPositionOfSaltInMessageBeforeDigestingEnvName
-
invertPositionOfPlainSaltInEncryptionResultsEnvName
private java.lang.String invertPositionOfPlainSaltInEncryptionResultsEnvName
-
useLenientSaltSizeCheckEnvName
private java.lang.String useLenientSaltSizeCheckEnvName
-
poolSizeEnvName
private java.lang.String poolSizeEnvName
-
algorithmSysPropertyName
private java.lang.String algorithmSysPropertyName
-
iterationsSysPropertyName
private java.lang.String iterationsSysPropertyName
-
saltSizeBytesSysPropertyName
private java.lang.String saltSizeBytesSysPropertyName
-
saltGeneratorClassNameSysPropertyName
private java.lang.String saltGeneratorClassNameSysPropertyName
-
providerNameSysPropertyName
private java.lang.String providerNameSysPropertyName
-
providerClassNameSysPropertyName
private java.lang.String providerClassNameSysPropertyName
-
invertPositionOfSaltInMessageBeforeDigestingSysPropertyName
private java.lang.String invertPositionOfSaltInMessageBeforeDigestingSysPropertyName
-
invertPositionOfPlainSaltInEncryptionResultsSysPropertyName
private java.lang.String invertPositionOfPlainSaltInEncryptionResultsSysPropertyName
-
useLenientSaltSizeCheckSysPropertyName
private java.lang.String useLenientSaltSizeCheckSysPropertyName
-
poolSizeSysPropertyName
private java.lang.String poolSizeSysPropertyName
-
-
Method Detail
-
getAlgorithmEnvName
public java.lang.String getAlgorithmEnvName()
Retrieve the name of the environment variable which value has been loaded as the algorithm.- Returns:
- the name of the variable
-
setAlgorithmEnvName
public void setAlgorithmEnvName(java.lang.String algorithmEnvName)
Set the config object to use the specified environment variable to load the value for the algorithm.- Parameters:
algorithmEnvName
- the name of the environment variable
-
getAlgorithmSysPropertyName
public java.lang.String getAlgorithmSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the algorithm.- Returns:
- the name of the property
-
setAlgorithmSysPropertyName
public void setAlgorithmSysPropertyName(java.lang.String algorithmSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the algorithm.- Parameters:
algorithmSysPropertyName
- the name of the property
-
getIterationsEnvName
public java.lang.String getIterationsEnvName()
Retrieve the name of the environment variable which value has been loaded as the iteration count.- Returns:
- the name of the variable
-
setIterationsEnvName
public void setIterationsEnvName(java.lang.String iterationsEnvName)
Set the config object to use the specified environment variable to load the value for the iteration count.- Parameters:
iterationsEnvName
- the name of the environment variable
-
getIterationsSysPropertyName
public java.lang.String getIterationsSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the iteration count.- Returns:
- the name of the property
-
setIterationsSysPropertyName
public void setIterationsSysPropertyName(java.lang.String iterationsSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the iteration count.- Parameters:
iterationsSysPropertyName
- the name of the property
-
getSaltSizeBytesEnvName
public java.lang.String getSaltSizeBytesEnvName()
Retrieve the name of the environment variable which value has been loaded as the salt size in bytes.- Returns:
- the name of the variable
-
setSaltSizeBytesEnvName
public void setSaltSizeBytesEnvName(java.lang.String saltSizeBytesEnvName)
Set the config object to use the specified environment variable to load the value for the salt size in bytes.- Parameters:
saltSizeBytesEnvName
- the name of the environment variable
-
getSaltSizeBytesSysPropertyName
public java.lang.String getSaltSizeBytesSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the salt size in bytes.- Returns:
- the name of the property
-
setSaltSizeBytesSysPropertyName
public void setSaltSizeBytesSysPropertyName(java.lang.String saltSizeBytesSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the salt size in bytes.- Parameters:
saltSizeBytesSysPropertyName
- the name of the property
-
getSaltGeneratorClassNameEnvName
public java.lang.String getSaltGeneratorClassNameEnvName()
Retrieve the name of the environment variable which value has been loaded as the salt generator class name.- Returns:
- the name of the variable
- Since:
- 1.3
-
setSaltGeneratorClassNameEnvName
public void setSaltGeneratorClassNameEnvName(java.lang.String saltGeneratorClassNameEnvName)
Set the config object to use the specified environment variable to load the value for the salt generator class name.
The salt generator class name which is set here must have a no-argument constructor, so that it can be instantiated and passed to the digester.
- Parameters:
saltGeneratorClassNameEnvName
- the name of the environment variable- Since:
- 1.3
-
getSaltGeneratorClassNameSysPropertyName
public java.lang.String getSaltGeneratorClassNameSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the salt generator class name.- Returns:
- the name of the property
- Since:
- 1.3
-
setSaltGeneratorClassNameSysPropertyName
public void setSaltGeneratorClassNameSysPropertyName(java.lang.String saltGeneratorClassNameSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the salt generator class name.
The salt generator class name which is set here must have a no-argument constructor, so that it can be instantiated and passed to the digester.
- Parameters:
saltGeneratorClassNameSysPropertyName
- the name of the property- Since:
- 1.3
-
getProviderNameEnvName
public java.lang.String getProviderNameEnvName()
Retrieve the name of the environment variable which value has been loaded as the provider name.- Returns:
- the name of the variable
- Since:
- 1.3
-
setProviderNameEnvName
public void setProviderNameEnvName(java.lang.String providerNameEnvName)
Set the config object to use the specified environment variable to load the value for the provider name.
- Parameters:
providerNameEnvName
- the name of the environment variable- Since:
- 1.3
-
getProviderNameSysPropertyName
public java.lang.String getProviderNameSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the provider name.- Returns:
- the name of the property
- Since:
- 1.3
-
setProviderNameSysPropertyName
public void setProviderNameSysPropertyName(java.lang.String providerNameSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the provider name.- Parameters:
providerNameSysPropertyName
- the name of the property- Since:
- 1.3
-
getProviderClassNameEnvName
public java.lang.String getProviderClassNameEnvName()
Retrieve the name of the environment variable which value has been loaded as the provider class name.- Returns:
- the name of the variable
- Since:
- 1.3
-
setProviderClassNameEnvName
public void setProviderClassNameEnvName(java.lang.String providerClassNameEnvName)
Set the config object to use the specified environment variable to load the value for the provider class name.
The provider class name which is set here must have a no-argument constructor, so that it can be instantiated and passed to the digester.
- Parameters:
providerClassNameEnvName
- the name of the environment variable- Since:
- 1.3
-
getProviderClassNameSysPropertyName
public java.lang.String getProviderClassNameSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the provider class name.- Returns:
- the name of the property
- Since:
- 1.3
-
setProviderClassNameSysPropertyName
public void setProviderClassNameSysPropertyName(java.lang.String providerClassNameSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the provider class name.
The provider class name which is set here must have a no-argument constructor, so that it can be instantiated and passed to the digester.
- Parameters:
providerClassNameSysPropertyName
- the name of the property- Since:
- 1.3
-
getInvertPositionOfSaltInMessageBeforeDigestingEnvName
public java.lang.String getInvertPositionOfSaltInMessageBeforeDigestingEnvName()
Retrieve the name of the environment variable which value has been loaded as the value for the invertPositionOfSaltInMessageBeforeDigesting property.- Returns:
- the name of the variable
- Since:
- 1.7
-
setInvertPositionOfSaltInMessageBeforeDigestingEnvName
public void setInvertPositionOfSaltInMessageBeforeDigestingEnvName(java.lang.String invertPositionOfSaltInMessageBeforeDigestingEnvName)
Set the config object to use the specified environment variable to load the value for the invertPositionOfSaltInMessageBeforeDigesting property.
- Parameters:
invertPositionOfSaltInMessageBeforeDigestingEnvName
- the name of the environment variable- Since:
- 1.7
-
getInvertPositionOfSaltInMessageBeforeDigestingSysPropertyName
public java.lang.String getInvertPositionOfSaltInMessageBeforeDigestingSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the value for the invertPositionOfSaltInMessageBeforeDigesting property.- Returns:
- the name of the property
- Since:
- 1.7
-
setInvertPositionOfSaltInMessageBeforeDigestingSysPropertyName
public void setInvertPositionOfSaltInMessageBeforeDigestingSysPropertyName(java.lang.String invertPositionOfSaltInMessageBeforeDigestingSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the invertPositionOfSaltInMessageBeforeDigesting property.
- Parameters:
invertPositionOfSaltInMessageBeforeDigestingSysPropertyName
- the name of the property- Since:
- 1.7
-
getInvertPositionOfPlainSaltInEncryptionResultsEnvName
public java.lang.String getInvertPositionOfPlainSaltInEncryptionResultsEnvName()
Retrieve the name of the environment variable which value has been loaded as the value for the invertPositionOfPlainSaltInEncryptionResults property.- Returns:
- the name of the variable
- Since:
- 1.7
-
setInvertPositionOfPlainSaltInEncryptionResultsEnvName
public void setInvertPositionOfPlainSaltInEncryptionResultsEnvName(java.lang.String invertPositionOfPlainSaltInEncryptionResultsEnvName)
Set the config object to use the specified environment variable to load the value for the invertPositionOfPlainSaltInEncryptionResults property.
- Parameters:
invertPositionOfPlainSaltInEncryptionResultsEnvName
- the name of the environment variable- Since:
- 1.7
-
getInvertPositionOfPlainSaltInEncryptionResultsSysPropertyName
public java.lang.String getInvertPositionOfPlainSaltInEncryptionResultsSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the value for the invertPositionOfPlainSaltInEncryptionResults property.- Returns:
- the name of the property
- Since:
- 1.7
-
setInvertPositionOfPlainSaltInEncryptionResultsSysPropertyName
public void setInvertPositionOfPlainSaltInEncryptionResultsSysPropertyName(java.lang.String invertPositionOfPlainSaltInEncryptionResultsSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the invertPositionOfPlainSaltInEncryptionResults property.
- Parameters:
invertPositionOfPlainSaltInEncryptionResultsSysPropertyName
- the name of the property- Since:
- 1.7
-
getUseLenientSaltSizeCheckEnvName
public java.lang.String getUseLenientSaltSizeCheckEnvName()
Retrieve the name of the environment variable which value has been loaded as the value for the useLenientSaltSizeCheck property.- Returns:
- the name of the variable
- Since:
- 1.7
-
setUseLenientSaltSizeCheckEnvName
public void setUseLenientSaltSizeCheckEnvName(java.lang.String useLenientSaltSizeCheckEnvName)
Set the config object to use the specified environment variable to load the value for the useLenientSaltSizeCheck property.
- Parameters:
useLenientSaltSizeCheckEnvName
- the name of the environment variable- Since:
- 1.7
-
getUseLenientSaltSizeCheckSysPropertyName
public java.lang.String getUseLenientSaltSizeCheckSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the value for the useLenientSaltSizeCheck property.- Returns:
- the name of the property
- Since:
- 1.7
-
setUseLenientSaltSizeCheckSysPropertyName
public void setUseLenientSaltSizeCheckSysPropertyName(java.lang.String useLenientSaltSizeCheckSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the useLenientSaltSizeCheck property.
- Parameters:
useLenientSaltSizeCheckSysPropertyName
- the name of the property- Since:
- 1.7
-
getPoolSizeEnvName
public java.lang.String getPoolSizeEnvName()
Retrieve the name of the environment variable which value has been loaded as the value for the poolSize property.- Returns:
- the name of the variable
- Since:
- 1.7
-
setPoolSizeEnvName
public void setPoolSizeEnvName(java.lang.String poolSizeEnvName)
Set the config object to use the specified environment variable to load the value for the poolSize property.
- Parameters:
poolSizeEnvName
- the name of the environment variable- Since:
- 1.7
-
getPoolSizeSysPropertyName
public java.lang.String getPoolSizeSysPropertyName()
Retrieve the name of the JVM system property which value has been loaded as the value for the poolSize property.- Returns:
- the name of the property
- Since:
- 1.7
-
setPoolSizeSysPropertyName
public void setPoolSizeSysPropertyName(java.lang.String poolSizeSysPropertyName)
Set the config object to use the specified JVM system property to load the value for the useLenientSaltSizeCheck property.
- Parameters:
poolSizeSysPropertyName
- the name of the property- Since:
- 1.7
-
setAlgorithm
public void setAlgorithm(java.lang.String algorithm)
Description copied from class:SimpleDigesterConfig
Sets the name of the algorithm.
This algorithm has to be supported by your security infrastructure, and it should be allowed as an algorithm for creating java.security.MessageDigest instances.
If you are specifying a security provider with
SimpleDigesterConfig.setProvider(Provider)
orSimpleDigesterConfig.setProviderName(String)
, this algorithm should be supported by your specified provider.If you are not specifying a provider, you will be able to use those algorithms provided by the default security provider of your JVM vendor. For valid names in the Sun JVM, see Java Cryptography Architecture API Specification & Reference.
Determines the result of:
SimpleDigesterConfig.getAlgorithm()
- Overrides:
setAlgorithm
in classSimpleDigesterConfig
- Parameters:
algorithm
- the name of the algorithm.
-
setIterations
public void setIterations(java.lang.Integer iterations)
Description copied from class:SimpleDigesterConfig
Sets the number of hashing iterations.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getIterations()
- Overrides:
setIterations
in classSimpleDigesterConfig
- Parameters:
iterations
- the number of iterations.
-
setIterations
public void setIterations(java.lang.String iterations)
Description copied from class:SimpleDigesterConfig
Sets the number of hashing iterations.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getIterations()
- Overrides:
setIterations
in classSimpleDigesterConfig
- Parameters:
iterations
- the number of iterations.
-
setSaltSizeBytes
public void setSaltSizeBytes(java.lang.Integer saltSizeBytes)
Description copied from class:SimpleDigesterConfig
Size in bytes of the salt to be used.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getSaltSizeBytes()
- Overrides:
setSaltSizeBytes
in classSimpleDigesterConfig
- Parameters:
saltSizeBytes
- the size of the salt, in bytes.
-
setSaltSizeBytes
public void setSaltSizeBytes(java.lang.String saltSizeBytes)
Description copied from class:SimpleDigesterConfig
Size in bytes of the salt to be used.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getSaltSizeBytes()
- Overrides:
setSaltSizeBytes
in classSimpleDigesterConfig
- Parameters:
saltSizeBytes
- the size of the salt, in bytes.
-
setSaltGenerator
public void setSaltGenerator(SaltGenerator saltGenerator)
Description copied from class:SimpleDigesterConfig
Sets the salt generator.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getSaltGenerator()
- Overrides:
setSaltGenerator
in classSimpleDigesterConfig
- Parameters:
saltGenerator
- the salt generator.
-
setSaltGeneratorClassName
public void setSaltGeneratorClassName(java.lang.String saltGeneratorClassName)
Description copied from class:SimpleDigesterConfig
Sets the class name of the salt generator.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getSaltGenerator()
- Overrides:
setSaltGeneratorClassName
in classSimpleDigesterConfig
- Parameters:
saltGeneratorClassName
- the name of the salt generator class.
-
setProviderName
public void setProviderName(java.lang.String providerName)
Description copied from class:SimpleDigesterConfig
Sets the name of the security provider to be asked for the digest algorithm. This provider should be already registered.
If both the providerName and provider properties are set, only provider will be used, and providerName will have no meaning for the digester object.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getProviderName()
- Overrides:
setProviderName
in classSimpleDigesterConfig
- Parameters:
providerName
- the name of the security provider.
-
setProvider
public void setProvider(java.security.Provider provider)
Description copied from class:SimpleDigesterConfig
Sets the security provider to be used for obtaining the digest algorithm. This method is an alternative to both
SimpleDigesterConfig.setProviderName(String)
andSimpleDigesterConfig.setProviderClassName(String)
and they should not be used altogether. The provider specified withSimpleDigesterConfig.setProvider(Provider)
does not have to be registered beforehand, and its use will not result in its being registered.If both the providerName and provider properties are set, only provider will be used, and providerName will have no meaning for the digester object.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getProvider()
- Overrides:
setProvider
in classSimpleDigesterConfig
- Parameters:
provider
- the security provider object.
-
setProviderClassName
public void setProviderClassName(java.lang.String providerClassName)
Description copied from class:SimpleDigesterConfig
Sets the class name for the security provider to be used for obtaining the digest algorithm. This method is an alternative to both
SimpleDigesterConfig.setProviderName(String)
SimpleDigesterConfig.setProvider(Provider)
and they should not be used altogether. The provider specified withSimpleDigesterConfig.setProviderClassName(String)
does not have to be registered beforehand, and its use will not result in its being registered.If both the providerName and provider properties are set, only provider will be used, and providerName will have no meaning for the digester object.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getProvider()
- Overrides:
setProviderClassName
in classSimpleDigesterConfig
- Parameters:
providerClassName
- the name of the security provider class.
-
setInvertPositionOfPlainSaltInEncryptionResults
public void setInvertPositionOfPlainSaltInEncryptionResults(java.lang.Boolean invertPositionOfPlainSaltInEncryptionResults)
Description copied from class:SimpleDigesterConfig
Whether the plain (not hashed) salt bytes are to be appended after the digest operation result bytes. The default behaviour is to insert them before the digest result, but setting this configuration item to true allows compatibility with some external systems and specifications (e.g. LDAP {SSHA}).
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getInvertPositionOfPlainSaltInEncryptionResults()
- Overrides:
setInvertPositionOfPlainSaltInEncryptionResults
in classSimpleDigesterConfig
- Parameters:
invertPositionOfPlainSaltInEncryptionResults
- whether plain salt will be appended after the digest operation result instead of inserted before it (which is the default).
-
setInvertPositionOfSaltInMessageBeforeDigesting
public void setInvertPositionOfSaltInMessageBeforeDigesting(java.lang.Boolean invertPositionOfSaltInMessageBeforeDigesting)
Description copied from class:SimpleDigesterConfig
Whether the salt bytes are to be appended after the message ones before performing the digest operation on the whole. The default behaviour is to insert those bytes before the message bytes, but setting this configuration item to true allows compatibility with some external systems and specifications (e.g. LDAP {SSHA}).
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getInvertPositionOfSaltInMessageBeforeDigesting()
- Overrides:
setInvertPositionOfSaltInMessageBeforeDigesting
in classSimpleDigesterConfig
- Parameters:
invertPositionOfSaltInMessageBeforeDigesting
- whether salt will be appended after the message before applying the digest operation on the whole, instead of inserted before it (which is the default).
-
setUseLenientSaltSizeCheck
public void setUseLenientSaltSizeCheck(java.lang.Boolean useLenientSaltSizeCheck)
Description copied from class:SimpleDigesterConfig
Whether digest matching operations will allow matching digests with a salt size different to the one configured in the "saltSizeBytes" property. This is possible because digest algorithms will produce a fixed-size result, so the remaining bytes from the hashed input will be considered salt.
This will allow the digester to match digests produced in environments which do not establish a fixed salt size as standard (for example, SSHA password encryption in LDAP systems).
The value of this property will not affect the creation of digests, which will always have a salt of the size established by the "saltSizeBytes" property. It will only affect digest matching.
Setting this property to true is not compatible with
SaltGenerator
implementations which return false for theirSaltGenerator.includePlainSaltInEncryptionResults()
property.Also, be aware that some algorithms or algorithm providers might not support knowing the size of the digests beforehand, which is also incompatible with a lenient behaviour.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getUseLenientSaltSizeCheck()
- Overrides:
setUseLenientSaltSizeCheck
in classSimpleDigesterConfig
- Parameters:
useLenientSaltSizeCheck
- whether the digester will allow matching of digests with different salt sizes than established or not (default is false).
-
setPoolSize
public void setPoolSize(java.lang.Integer poolSize)
Description copied from class:SimpleDigesterConfig
Sets the size of the pool of digesters to be created.
This parameter will be ignored if used with a non-pooled digester.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getPoolSize()
- Overrides:
setPoolSize
in classSimpleDigesterConfig
- Parameters:
poolSize
- the size of the pool to be used if this configuration is used with a pooled digester
-
setPoolSize
public void setPoolSize(java.lang.String poolSize)
Description copied from class:SimpleDigesterConfig
Sets the size of the pool of digesters to be created.
This parameter will be ignored if used with a non-pooled digester.
If not set, null will be returned.
Determines the result of:
SimpleDigesterConfig.getPoolSize()
- Overrides:
setPoolSize
in classSimpleDigesterConfig
- Parameters:
poolSize
- the size of the pool to be used if this configuration is used with a pooled digester
-
-