Package org.hawaiiframework.crypto
Class StringEncryptorConfig
java.lang.Object
org.hawaiiframework.crypto.StringEncryptorConfig
Config class to set up the
StringEncryptor
for encrypted properties.
This is moved to a separate class to make sure the StringEncryptor, which we're
overriding here to use the HawaiiStringEncryptor
is created before any encrypted
properties are accessed. Otherwise, Jasypt will fall back to its default StringEncryptor
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setEncryptionInitProperty
(String encryptionInitProperty) org.jasypt.encryption.StringEncryptor
Creates aStringEncryptor
to decrypt encrypted property values.
-
Constructor Details
-
StringEncryptorConfig
public StringEncryptorConfig()
-
-
Method Details
-
stringEncryptor
@Bean("jasyptStringEncryptor") public org.jasypt.encryption.StringEncryptor stringEncryptor()Creates aStringEncryptor
to decrypt encrypted property values.The environment variable identified by encryptionInit contains the key and the init vector.
- Returns:
- a new
HawaiiStringEncryptor
-
setEncryptionInitProperty
-