public final class SecurityUtility extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CIPHER_LENGTH |
static int |
CIPHER_UID_LENGTH |
static int |
CIPHER_UID_TIMESTAMP_LENGTH |
static int |
MESSAGE_LENGTH |
| Modifier and Type | Method and Description |
|---|---|
static String |
toDecryptedText(String aText)
Decrypt the given text in case it has the prefix identifying the text as
being encrypted, else the plain text is returned and a warning is printed
out that the passed text is not encrypted (just the first two or three
chars or zero chars are shown depending on the length of the text).
-------------------------------------------------------------------------
Attention: A unique system ID is used for decryption.
|
static String |
toDecryptedText(String aText,
String aPassPharse)
Decrypt the given text in case it has the prefix identifying the text as
being encrypted, else the plain text is returned and a warning is printed
out that the passed text is not encrypted (just the first two or three
chars or zero chars are shown depending on the length of the text).
|
static String |
toEncryptedText(String aText)
Encrypts the given text and prepends a prefix identifying the text as
being encrypted.
-------------------------------------------------------------------------
Attention: A unique system ID is used for encryption.
|
static String |
toEncryptedText(String aText,
String aPassPhrase)
Encrypts the given text and prepends a prefix identifying the text as
being encrypted.
|
public static final int CIPHER_UID_TIMESTAMP_LENGTH
public static final int CIPHER_UID_LENGTH
public static final int CIPHER_LENGTH
public static final int MESSAGE_LENGTH
public static String toDecryptedText(String aText)
toEncryptedText(String)!
-------------------------------------------------------------------------
This method is most useful for encrypting passwords or authentication
credentials in configuration files on live servers to provide at least a
minimum of security.aText - The text being decrypted.public static String toDecryptedText(String aText, String aPassPharse)
aText - The text being decrypted.aPassPharse - The pass phrase for decrypting.public static String toEncryptedText(String aText)
toDecryptedText(String) method will only work on the same system
used for encryption via this method!
-------------------------------------------------------------------------
This method is most useful for encrypting passwords or authentication
credentials in configuration files on live servers to provide at least a
minimum of security.aText - The text to be encrypted.public static String toEncryptedText(String aText, String aPassPhrase)
aText - The text to be encrypted.aPassPhrase - The pass phrase for the encrypted text.Copyright © 2017. All rights reserved.