Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasypt.intf.service
Class JasyptStatelessService

    Object
      org.jasypt.intf.service.JasyptStatelessService

    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.

Since:
  1.4
Author:
  Daniel Fernández

Constructor Summary
`JasyptStatelessService()` Creates a new instance of `JasyptStatelessService`.

Method Summary
`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.

Methods inherited from class Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JasyptStatelessService

    public JasyptStatelessService()

  Creates a new instance of `JasyptStatelessService`.

Method Detail

### digest

    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.

  Parameters:
    `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` -
  Returns:
    the result of the digest operation
  Throws:
    `EncryptionOperationNotPossibleException` - if the operation could not be performed (either because of wrong input or wrong parametrization).

### encrypt

    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.

  Parameters:
    `input` -
    `password` -
    `passwordEnvName` -
    `passwordSysPropertyName` -
    `algorithm` -
    `algorithmEnvName` -
    `algorithmSysPropertyName` -
    `keyObtentionIterations` -
    `keyObtentionIterationsEnvName` -
    `keyObtentionIterationsSysPropertyName` -
    `saltGeneratorClassName` -
    `saltGeneratorClassNameEnvName` -
    `saltGeneratorClassNameSysPropertyName` -
    `providerName` -
    `providerNameEnvName` -
    `providerNameSysPropertyName` -
    `providerClassName` -
    `providerClassNameEnvName` -
    `providerClassNameSysPropertyName` -
    `stringOutputType` -
    `stringOutputTypeEnvName` -
    `stringOutputTypeSysPropertyName` -
  Returns:
    the result of the encryption operation
  Throws:
    `EncryptionOperationNotPossibleException` - if the operation could not be performed (either because of wrong input or wrong parametrization).

### decrypt

    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.

  Parameters:
    `input` -
    `password` -
    `passwordEnvName` -
    `passwordSysPropertyName` -
    `algorithm` -
    `algorithmEnvName` -
    `algorithmSysPropertyName` -
    `keyObtentionIterations` -
    `keyObtentionIterationsEnvName` -
    `keyObtentionIterationsSysPropertyName` -
    `saltGeneratorClassName` -
    `saltGeneratorClassNameEnvName` -
    `saltGeneratorClassNameSysPropertyName` -
    `providerName` -
    `providerNameEnvName` -
    `providerNameSysPropertyName` -
    `providerClassName` -
    `providerClassNameEnvName` -
    `providerClassNameSysPropertyName` -
    `stringOutputType` -
    `stringOutputTypeEnvName` -
    `stringOutputTypeSysPropertyName` -
  Returns:
    the result of the decryption operation
  Throws:
    `EncryptionOperationNotPossibleException` - if the operation could not be performed (either because of wrong input or wrong parametrization).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014 The JASYPT team. All Rights Reserved.