Package org.flasby.settings
Class MixedEncrypt
java.lang.Object
org.flasby.settings.Encrypt
org.flasby.settings.MixedEncrypt
extends the Encrypt behaviour to support mixed encrypted and plaintext property values.
Encrypted property values will be tagged with {CRYPT} to distinguish them from plaintext properties.
To store a plaintext property value simply call against the passed in SimpleSettings.
To store an encrypted property call against this class
Both plain and encrypted properties can be retrieved using get(). Encrypt will baulk at fetching a plaintext value.
- Author:
- steve
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.flasby.settings.Settings
Settings.ApplyWithExistingValue, Settings.ApplyWithMissingKey
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMixedEncrypt
(SimpleSettings settings, char[] passPhrase) MixedEncrypt
(SimpleSettings settings, char[] passPhrase, byte[] salt, String keyAlgorithm) -
Method Summary
Methods inherited from class org.flasby.settings.Encrypt
decrypt, decrypt, doIfExists, doIfExists, encrypt, encrypt, isEmpty, iterator, main, remove
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
CRYPT_FLAG
- See Also:
-
-
Constructor Details
-
MixedEncrypt
- Throws:
Exception
-
MixedEncrypt
public MixedEncrypt(SimpleSettings settings, char[] passPhrase, byte[] salt, String keyAlgorithm) throws Exception - Throws:
Exception
-
-
Method Details
-
get
Description copied from interface:SimpleSettings
gets a value from this settings group. -
add
- Specified by:
add
in interfaceSimpleSettings
- Overrides:
add
in classEncrypt
-