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 TypeMethodDescriptionbyte[]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
Encrypts a payload with an external key reference.- Parameters:
plaintext- plaintext byteskeyReference- key reference- Returns:
- encrypted bytes
-
decrypt
Decrypts a payload with an external key reference.- Parameters:
ciphertext- encrypted byteskeyReference- key reference- Returns:
- plaintext bytes
-