Interface EnvelopeEncryptionService

All Known Implementing Classes:
TestEnvelopeEncryptionService

public interface EnvelopeEncryptionService
Thread-safe envelope encryption SPI.

Implementations receive and return byte arrays owned by the caller. They must not expose key material in errors or status.

  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    decrypt(byte[] ciphertext, KeyReference keyReference)
    Decrypts a payload with an external key reference.
    byte[]
    encrypt(byte[] plaintext, KeyReference keyReference)
    Encrypts a payload with an external key reference.
  • Method Details

    • encrypt

      byte[] encrypt(byte[] plaintext, KeyReference keyReference)
      Encrypts a payload with an external key reference.
      Parameters:
      plaintext - plaintext bytes
      keyReference - key reference
      Returns:
      encrypted bytes
    • decrypt

      byte[] decrypt(byte[] ciphertext, KeyReference keyReference)
      Decrypts a payload with an external key reference.
      Parameters:
      ciphertext - encrypted bytes
      keyReference - key reference
      Returns:
      plaintext bytes