Class KmsTextEncryptor
- java.lang.Object
-
- de.zalando.spring.cloud.config.aws.kms.KmsTextEncryptor
-
- All Implemented Interfaces:
org.springframework.security.crypto.encrypt.TextEncryptor
public class KmsTextEncryptor extends Object implements org.springframework.security.crypto.encrypt.TextEncryptor
ThisTextEncryptoruses AWS KMS (Key Management Service) to encrypt / decrypt strings. Encoded cipher strings are represented in Base64 format, to have a nicer string representation (only alpha-numeric chars), that can be easily used as values in property files.
-
-
Constructor Summary
Constructors Constructor Description KmsTextEncryptor(com.amazonaws.services.kms.AWSKMS kms, String kmsKeyId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdecrypt(String encryptedText)Stringencrypt(String text)
-
-
-
Constructor Detail
-
KmsTextEncryptor
public KmsTextEncryptor(com.amazonaws.services.kms.AWSKMS kms, String kmsKeyId)- Parameters:
kms- The AWS KMS clientkmsKeyId- The ID or full ARN of the KMS key, e.g. arn:aws:kms:eu-west-1:089972051332:key/9d9fca31-54c5-4de5-ba4f-128dfb9a5031. Must not be blank, if you you want to encrypt text.
-
-