public class KeyStoreTextEncryptorLocator extends Object implements TextEncryptorLocator
TextEncryptorLocator
that pulls RSA key pairs out of a keystore. The input
map can contain entries for "key" or "secret" or both, or neither. The secret in the
input map is not, in general, the secret in the keystore, but is dereferenced through a
SecretLocator
(so for example you can keep a table of encrypted secrets and
update it separately to the keystore).Constructor and Description |
---|
KeyStoreTextEncryptorLocator(org.springframework.security.rsa.crypto.KeyStoreKeyFactory keys,
String defaultSecret,
String defaultAlias) |
Modifier and Type | Method and Description |
---|---|
org.springframework.security.crypto.encrypt.TextEncryptor |
locate(Map<String,String> keys) |
void |
setRsaAlgorithm(org.springframework.security.rsa.crypto.RsaAlgorithm rsaAlgorithm) |
void |
setSalt(String salt) |
void |
setSecretLocator(SecretLocator secretLocator) |
void |
setStrong(boolean strong) |
public void setSecretLocator(SecretLocator secretLocator)
secretLocator
- the secretLocator to setpublic void setRsaAlgorithm(org.springframework.security.rsa.crypto.RsaAlgorithm rsaAlgorithm)
public void setStrong(boolean strong)
public void setSalt(String salt)
public org.springframework.security.crypto.encrypt.TextEncryptor locate(Map<String,String> keys)
locate
in interface TextEncryptorLocator
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.