public abstract class TextEncryptorUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TextEncryptorUtils.FailsafeTextEncryptor
TextEncryptor that just fails, so that users don't get a false sense of security
adding ciphers to config files and not getting them decrypted.
|
| Constructor and Description |
|---|
TextEncryptorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.security.crypto.encrypt.TextEncryptor |
createTextEncryptor(KeyProperties keyProperties,
RsaProperties rsaProperties)
Utility to create a
TextEncryptor via properties. |
static boolean |
isLegacyBootstrap(org.springframework.core.env.Environment environment)
Method to check if legacy bootstrap mode is enabled.
|
static boolean |
keysConfigured(KeyProperties properties)
Is a key configured.
|
static void |
promote(org.springframework.boot.BootstrapContext bootstrapContext,
org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
Promote the
TextEncryptor to the ApplicationContext. |
static void |
register(org.springframework.boot.BootstrapRegistry registry)
Register all classes that need a
TextEncryptor in
TextEncryptorConfigBootstrapper. |
public static void register(org.springframework.boot.BootstrapRegistry registry)
TextEncryptor in
TextEncryptorConfigBootstrapper.registry - the BootstrapRegistry.public static void promote(org.springframework.boot.BootstrapContext bootstrapContext,
org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
TextEncryptor to the ApplicationContext.bootstrapContext - the Context.beanFactory - the bean factory.public static org.springframework.security.crypto.encrypt.TextEncryptor createTextEncryptor(KeyProperties keyProperties, RsaProperties rsaProperties)
TextEncryptor via properties.keyProperties - the Key properties.rsaProperties - RSA properties.TextEncryptor.public static boolean keysConfigured(KeyProperties properties)
properties - the Key properties.public static boolean isLegacyBootstrap(org.springframework.core.env.Environment environment)
environment - where to check properties.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.