Class VaultBytesEncryptor
java.lang.Object
org.springframework.vault.security.VaultBytesEncryptor
- All Implemented Interfaces:
BytesEncryptor
Vault-based
BytesEncryptor
using Vault's transit backend.
Encryption/decryption is bound to a particular key that must support encryption and
decryption.- Since:
- 2.0
- Author:
- Mark Paluch
-
Constructor Summary
ConstructorDescriptionVaultBytesEncryptor
(VaultTransitOperations transitOperations, String keyName) -
Method Summary
-
Constructor Details
-
VaultBytesEncryptor
- Parameters:
transitOperations
- must not be null.keyName
- must not be null or empty.
-
-
Method Details
-
encrypt
public byte[] encrypt(byte[] plaintext) - Specified by:
encrypt
in interfaceBytesEncryptor
-
decrypt
public byte[] decrypt(byte[] ciphertext) - Specified by:
decrypt
in interfaceBytesEncryptor
-