public interface Encryption
Modifier and Type | Field and Description |
---|---|
static char |
ENCRYPTION_METHOD_END_CHAR
The end char which encapsulates the encryption method.
|
static char |
ENCRYPTION_METHOD_START_CHAR
The start char which encapsulates the encryption method.
|
Modifier and Type | Method and Description |
---|---|
String |
getDecryptedValue(String value)
Decrypt's a string value.
|
String |
getEncryptedValue(String value)
Encrypts a string value.
|
String |
getEncryptionMethod()
Gets the method name of encryption.
|
boolean |
isDecryptable()
Determines if the encrypted string is decryptable, with the method used.
|
boolean |
isEncrypted(String value)
Determines if the value is already in in encrypted form.
|
static final char ENCRYPTION_METHOD_START_CHAR
static final char ENCRYPTION_METHOD_END_CHAR
String getEncryptionMethod()
String getEncryptedValue(String value) throws PropertyException
value
- the string valuePropertyException
- if value is null
or encryption is not possible or an error during encryption as occurred.String getDecryptedValue(String value) throws PropertyException
value
- the string valuePropertyException
- if value is null
or decryption is not possible or an error during decryption as occurred.boolean isDecryptable()
true
if it is decryptable, otherwise false
.boolean isEncrypted(String value) throws PropertyException
value
- the stringtrue
if the string is encrypted otherwise false
, also returns false
if the value is null
. Determines if "[method]" is a front the string value.PropertyException
- if a the password is encrypted with another method.