
public class SecuredPropertiesConfig extends Object implements Config
SecuredProperties.| Constructor and Description |
|---|
SecuredPropertiesConfig() |
| Modifier and Type | Method and Description |
|---|---|
SecuredPropertiesConfig |
addAllowedAlgorithm(Algorithm... addedAllowedAlgorithm) |
Algorithm[] |
getAllowedAlgorithm() |
int |
getSaltLength() |
File |
getSecretFile()
Return the SecretFile location which is needed to decrypt and encrypt your property-values.
|
SecuredPropertiesConfig |
init(ConfigInitializer... configInitializers)
The generic variant of
initDefault(). |
SecuredPropertiesConfig |
initDefault()
Similar to Spring-Boot, Externalize your configuration so that you can work with the same application code in different environments.
|
boolean |
isAutoCreateSecretKey() |
SecuredPropertiesConfig |
withAllowedAlgorithm(Algorithm... newAllowedAlgorithm) |
SecuredPropertiesConfig |
withAutoCreateSecretKey(boolean autoCreate) |
SecuredPropertiesConfig |
withSaltLength(int newSaltLength) |
SecuredPropertiesConfig |
withSecretFile(File newSecretFile)
Overwrite the default location "%user_home%/.secret/securedProperties.key" for the secret key to encrypt and decrypt values.
|
public File getSecretFile()
Default is $HOME/.secret/securedProperties.key
public int getSaltLength()
public boolean isAutoCreateSecretKey()
public Algorithm[] getAllowedAlgorithm()
public SecuredPropertiesConfig initDefault()
The Properties which can be configured can be found in ConfigKey.
The default prefix is "SECURED_PROPERTIES" and the keys must be configured formatted as:
public SecuredPropertiesConfig init(ConfigInitializer... configInitializers)
initDefault(). Just put your ConfigInitializers into it in the order you want.
The last one has the highest priority and will overwrite properties before.
configInitializers - your ConfigInitializers. See ConfigInitializers.public SecuredPropertiesConfig withSecretFile(File newSecretFile)
withSecretFile in interface ConfignewSecretFile - the secret Filepublic SecuredPropertiesConfig withSaltLength(int newSaltLength)
withSaltLength in interface Configpublic SecuredPropertiesConfig withAllowedAlgorithm(Algorithm... newAllowedAlgorithm)
withAllowedAlgorithm in interface Configpublic SecuredPropertiesConfig addAllowedAlgorithm(Algorithm... addedAllowedAlgorithm)
public SecuredPropertiesConfig withAutoCreateSecretKey(boolean autoCreate)
withAutoCreateSecretKey in interface ConfigCopyright © 2016–2019 Brabenetz Harald, Austria. All rights reserved.