Interface VaultTransformOperations

All Known Implementing Classes:
VaultTransformTemplate

public interface VaultTransformOperations
Interface that specifies operations using the transform backend.
Since:
2.3
Author:
Lauren Voswinkel, Mark Paluch
See Also:
  • Method Details

    • encode

      String encode(String roleName, String plaintext)
      Encode the provided plaintext using the named role.
      Parameters:
      roleName - must not be empty or null.
      plaintext - must not be empty or null.
      Returns:
      cipher text.
    • encode

      TransformCiphertext encode(String roleName, TransformPlaintext plaintext)
      Encode the provided plaintext using the named role.
      Parameters:
      roleName - must not be empty or null.
      plaintext - must not be null.
      Returns:
      cipher text.
    • encode

      default TransformCiphertext encode(String roleName, byte[] plaintext, VaultTransformContext transformRequest)
      Encode the provided plaintext using the named role.
      Parameters:
      roleName - must not be empty or null.
      plaintext - must not be empty or null.
      transformRequest - must not be null. Use VaultTransformContext.empty() if no request options provided.
      Returns:
      cipher text.
    • encode

      List<VaultTransformEncodeResult> encode(String roleName, List<TransformPlaintext> batchRequest)
      Encode the provided batch of plaintext using the role given and transformation in each list item. The encryption is done using transformation secret backend's batch operation.
      Parameters:
      roleName - must not be empty or null.
      batchRequest - a list of Plaintext which includes plaintext and an optional context.
      Returns:
      the encrypted result in the order of batchRequest plaintexts.
    • decode

      default String decode(String roleName, String ciphertext)
      Decode the provided ciphertext using the named role.
      Parameters:
      roleName - must not be empty or null.
      ciphertext - must not be empty or null.
      Returns:
      plain text.
    • decode

      TransformPlaintext decode(String roleName, TransformCiphertext ciphertext)
      Decode the provided ciphertext using the named role.
      Parameters:
      roleName - must not be empty or null.
      ciphertext - must not be null.
      Returns:
      plain text.
    • decode

      String decode(String roleName, String ciphertext, VaultTransformContext transformContext)
      Decode the provided ciphertext using the named role.
      Parameters:
      roleName - must not be empty or null.
      ciphertext - must not be empty or null.
      transformContext - must not be null. Use VaultTransformContext.empty() if no request options provided.
      Returns:
      plain text.
    • decode

      List<VaultTransformDecodeResult> decode(String roleName, List<TransformCiphertext> batchRequest)
      Decode the provided batch of ciphertext using the role given and transformation in each list item. The decryption is done using transformation secret backend's batch operation.
      Parameters:
      roleName - must not be empty or null.
      batchRequest - a list of Ciphertext which includes plaintext and an optional context.
      Returns:
      the decrypted result in the order of batchRequest ciphertexts.