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, getReplacement
public 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)
ConfigReplacer
init
in interface ConfigReplacer
init
in class AbstractPbeReplacer
properties
- properties configured (not null
)public String getPrefix()
ConfigReplacer
protected char[] getPassword()
AbstractPbeReplacer
getPassword
in class AbstractPbeReplacer
null
or emptyCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.