public class EncryptionReplacer extends AbstractPbeReplacer
ConfigReplacer implementation which decrypts
encrypted values.
The main(String...) method is provided to generate the encrypted variables.
This class extends AbstractPbeReplacer where the main encryption logic is located. This class implements
getPassword() method and depending on configuration allows to use a password file and/or user properties (name and
HOME) and/or network interface properties (MAC address).
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_PASSWORD_FILE
Replacer property name to configure path to a password file which content should be used as part of the encryption
password.
|
static String |
PROPERTY_PASSWORD_NETWORK_INTERFACE
Replacer property name to configure network interface name used to retrieve MAC address used as part of the encryption
password.
|
static String |
PROPERTY_PASSWORD_USER_PROPERTIES
Replacer property name to configure
true/false flag contolling if users properties should be used as part
of the encryption password. |
DEFAULT_CIPHER_ALGORITHM, DEFAULT_SECRET_KEY_FACTORY_ALGORITHM, PROPERTY_CIPHER_ALGORITHM, PROPERTY_KEY_LENGTH_BITS, PROPERTY_SALT_LENGTH_BYTES, PROPERTY_SECRET_KEY_ALGORITHM, PROPERTY_SECRET_KEY_FACTORY_ALGORITHM, PROPERTY_SECURITY_PROVIDER| Constructor and Description |
|---|
EncryptionReplacer() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
encrypt(String... args) |
protected char[] |
getPassword()
Provides password for a chosen SecretKeyFactory.
|
String |
getPrefix()
Variable replacer prefix string.
|
void |
init(Properties properties)
Initialization method called before first usage of the config replacer.
|
static void |
main(String... args) |
decrypt, encrypt, getReplacementpublic static final String PROPERTY_PASSWORD_USER_PROPERTIES
true/false flag contolling if users properties should be used as part
of the encryption password.public static final String PROPERTY_PASSWORD_NETWORK_INTERFACE
public static final String PROPERTY_PASSWORD_FILE
public void init(Properties properties)
ConfigReplacerinit in interface ConfigReplacerinit in class AbstractPbeReplacerproperties - properties configured (not null)public String getPrefix()
ConfigReplacerprotected char[] getPassword()
AbstractPbeReplacergetPassword in class AbstractPbeReplacernull or emptyCopyright © 2020 Hazelcast, Inc.. All rights reserved.