public final class JasyptStatelessService extends Object
This class acts as a stateless service for encryption, decryption and digest operations, letting its clients configure all the jasypt environment (algorithms, passwords, providers...) from Strings in a single call, be it using direct values, environment variables or java vm properties.
It is meant to service the CLI interfaces, but it can also be used for other purposes. For instance, by subclassing or wrapping it with a JAX-WS web service class, developers can easily create an encryption web service.
Constructor and Description |
---|
JasyptStatelessService()
Creates a new instance of JasyptStatelessService.
|
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String input,
String password,
String passwordEnvName,
String passwordSysPropertyName,
String algorithm,
String algorithmEnvName,
String algorithmSysPropertyName,
String keyObtentionIterations,
String keyObtentionIterationsEnvName,
String keyObtentionIterationsSysPropertyName,
String saltGeneratorClassName,
String saltGeneratorClassNameEnvName,
String saltGeneratorClassNameSysPropertyName,
String providerName,
String providerNameEnvName,
String providerNameSysPropertyName,
String providerClassName,
String providerClassNameEnvName,
String providerClassNameSysPropertyName,
String stringOutputType,
String stringOutputTypeEnvName,
String stringOutputTypeSysPropertyName)
Configure and perform a decryption operation.
|
String |
digest(String input,
String algorithm,
String algorithmEnvName,
String algorithmSysPropertyName,
String iterations,
String iterationsEnvName,
String iterationsSysPropertyName,
String saltSizeBytes,
String saltSizeBytesEnvName,
String saltSizeBytesSysPropertyName,
String saltGeneratorClassName,
String saltGeneratorClassNameEnvName,
String saltGeneratorClassNameSysPropertyName,
String providerName,
String providerNameEnvName,
String providerNameSysPropertyName,
String providerClassName,
String providerClassNameEnvName,
String providerClassNameSysPropertyName,
String invertPositionOfSaltInMessageBeforeDigesting,
String invertPositionOfSaltInMessageBeforeDigestingEnvName,
String invertPositionOfSaltInMessageBeforeDigestingSysPropertyName,
String invertPositionOfPlainSaltInEncryptionResults,
String invertPositionOfPlainSaltInEncryptionResultsEnvName,
String invertPositionOfPlainSaltInEncryptionResultsSysPropertyName,
String useLenientSaltSizeCheck,
String useLenientSaltSizeCheckEnvName,
String useLenientSaltSizeCheckSysPropertyName,
String unicodeNormalizationIgnored,
String unicodeNormalizationIgnoredEnvName,
String unicodeNormalizationIgnoredSysPropertyName,
String stringOutputType,
String stringOutputTypeEnvName,
String stringOutputTypeSysPropertyName,
String prefix,
String prefixEnvName,
String prefixSysPropertyName,
String suffix,
String suffixEnvName,
String suffixSysPropertyName)
Configure and perform a digest operation.
|
String |
encrypt(String input,
String password,
String passwordEnvName,
String passwordSysPropertyName,
String algorithm,
String algorithmEnvName,
String algorithmSysPropertyName,
String keyObtentionIterations,
String keyObtentionIterationsEnvName,
String keyObtentionIterationsSysPropertyName,
String saltGeneratorClassName,
String saltGeneratorClassNameEnvName,
String saltGeneratorClassNameSysPropertyName,
String providerName,
String providerNameEnvName,
String providerNameSysPropertyName,
String providerClassName,
String providerClassNameEnvName,
String providerClassNameSysPropertyName,
String stringOutputType,
String stringOutputTypeEnvName,
String stringOutputTypeSysPropertyName)
Configure and perform an encryption operation.
|
public JasyptStatelessService()
public String digest(String input, String algorithm, String algorithmEnvName, String algorithmSysPropertyName, String iterations, String iterationsEnvName, String iterationsSysPropertyName, String saltSizeBytes, String saltSizeBytesEnvName, String saltSizeBytesSysPropertyName, String saltGeneratorClassName, String saltGeneratorClassNameEnvName, String saltGeneratorClassNameSysPropertyName, String providerName, String providerNameEnvName, String providerNameSysPropertyName, String providerClassName, String providerClassNameEnvName, String providerClassNameSysPropertyName, String invertPositionOfSaltInMessageBeforeDigesting, String invertPositionOfSaltInMessageBeforeDigestingEnvName, String invertPositionOfSaltInMessageBeforeDigestingSysPropertyName, String invertPositionOfPlainSaltInEncryptionResults, String invertPositionOfPlainSaltInEncryptionResultsEnvName, String invertPositionOfPlainSaltInEncryptionResultsSysPropertyName, String useLenientSaltSizeCheck, String useLenientSaltSizeCheckEnvName, String useLenientSaltSizeCheckSysPropertyName, String unicodeNormalizationIgnored, String unicodeNormalizationIgnoredEnvName, String unicodeNormalizationIgnoredSysPropertyName, String stringOutputType, String stringOutputTypeEnvName, String stringOutputTypeSysPropertyName, String prefix, String prefixEnvName, String prefixSysPropertyName, String suffix, String suffixEnvName, String suffixSysPropertyName)
Configure and perform a digest operation.
input
- algorithm
- algorithmEnvName
- algorithmSysPropertyName
- iterations
- iterationsEnvName
- iterationsSysPropertyName
- saltSizeBytes
- saltSizeBytesEnvName
- saltSizeBytesSysPropertyName
- saltGeneratorClassName
- saltGeneratorClassNameEnvName
- saltGeneratorClassNameSysPropertyName
- providerName
- providerNameEnvName
- providerNameSysPropertyName
- providerClassName
- providerClassNameEnvName
- providerClassNameSysPropertyName
- invertPositionOfSaltInMessageBeforeDigesting
- invertPositionOfSaltInMessageBeforeDigestingEnvName
- invertPositionOfSaltInMessageBeforeDigestingSysPropertyName
- invertPositionOfPlainSaltInEncryptionResults
- invertPositionOfPlainSaltInEncryptionResultsEnvName
- invertPositionOfPlainSaltInEncryptionResultsSysPropertyName
- useLenientSaltSizeCheck
- useLenientSaltSizeCheckEnvName
- useLenientSaltSizeCheckSysPropertyName
- unicodeNormalizationIgnored
- unicodeNormalizationIgnoredEnvName
- unicodeNormalizationIgnoredSysPropertyName
- stringOutputType
- stringOutputTypeEnvName
- stringOutputTypeSysPropertyName
- prefix
- prefixEnvName
- prefixSysPropertyName
- suffix
- suffixEnvName
- suffixSysPropertyName
- EncryptionOperationNotPossibleException
- if the operation could
not be performed (either because of wrong input or wrong
parametrization).public String encrypt(String input, String password, String passwordEnvName, String passwordSysPropertyName, String algorithm, String algorithmEnvName, String algorithmSysPropertyName, String keyObtentionIterations, String keyObtentionIterationsEnvName, String keyObtentionIterationsSysPropertyName, String saltGeneratorClassName, String saltGeneratorClassNameEnvName, String saltGeneratorClassNameSysPropertyName, String providerName, String providerNameEnvName, String providerNameSysPropertyName, String providerClassName, String providerClassNameEnvName, String providerClassNameSysPropertyName, String stringOutputType, String stringOutputTypeEnvName, String stringOutputTypeSysPropertyName)
Configure and perform an encryption operation.
input
- password
- passwordEnvName
- passwordSysPropertyName
- algorithm
- algorithmEnvName
- algorithmSysPropertyName
- keyObtentionIterations
- keyObtentionIterationsEnvName
- keyObtentionIterationsSysPropertyName
- saltGeneratorClassName
- saltGeneratorClassNameEnvName
- saltGeneratorClassNameSysPropertyName
- providerName
- providerNameEnvName
- providerNameSysPropertyName
- providerClassName
- providerClassNameEnvName
- providerClassNameSysPropertyName
- stringOutputType
- stringOutputTypeEnvName
- stringOutputTypeSysPropertyName
- EncryptionOperationNotPossibleException
- if the operation could
not be performed (either because of wrong input or wrong
parametrization).public String decrypt(String input, String password, String passwordEnvName, String passwordSysPropertyName, String algorithm, String algorithmEnvName, String algorithmSysPropertyName, String keyObtentionIterations, String keyObtentionIterationsEnvName, String keyObtentionIterationsSysPropertyName, String saltGeneratorClassName, String saltGeneratorClassNameEnvName, String saltGeneratorClassNameSysPropertyName, String providerName, String providerNameEnvName, String providerNameSysPropertyName, String providerClassName, String providerClassNameEnvName, String providerClassNameSysPropertyName, String stringOutputType, String stringOutputTypeEnvName, String stringOutputTypeSysPropertyName)
Configure and perform a decryption operation.
input
- password
- passwordEnvName
- passwordSysPropertyName
- algorithm
- algorithmEnvName
- algorithmSysPropertyName
- keyObtentionIterations
- keyObtentionIterationsEnvName
- keyObtentionIterationsSysPropertyName
- saltGeneratorClassName
- saltGeneratorClassNameEnvName
- saltGeneratorClassNameSysPropertyName
- providerName
- providerNameEnvName
- providerNameSysPropertyName
- providerClassName
- providerClassNameEnvName
- providerClassNameSysPropertyName
- stringOutputType
- stringOutputTypeEnvName
- stringOutputTypeSysPropertyName
- EncryptionOperationNotPossibleException
- if the operation could
not be performed (either because of wrong input or wrong
parametrization).Copyright © 2019 JBoss by Red Hat. All rights reserved.