Modifier and Type | Field and Description |
---|---|
private static int |
BITS_IN_HALF_BYTE |
private static char[] |
HEX_CHARS |
private static int |
INDEX_NOT_FOUND |
private static byte[] |
KEY_BYTES |
private static char |
MASK |
Constructor and Description |
---|
DefaultCryptor() |
Modifier and Type | Method and Description |
---|---|
private byte[] |
decode(java.lang.String str)
Decodes Hex-Bytes.
|
java.lang.String |
decrypt(java.lang.String encryptedKey)
Decrypts the password.
|
private java.lang.String |
encode(byte[] bytes)
Hex-encode bytes.
|
java.lang.String |
encrypt(java.lang.String plainKey)
Encrypt the plain text password.
|
private int |
indexOf(char[] array,
char valueToFind) |
private static final char[] HEX_CHARS
private static final byte[] KEY_BYTES
private static final int INDEX_NOT_FOUND
private static final int BITS_IN_HALF_BYTE
private static final char MASK
public java.lang.String encrypt(java.lang.String plainKey) throws java.lang.Exception
Warning: This uses AES128 with a fixed encryption key. This is only an obfuscation no cryptographic secure protection.
public java.lang.String decrypt(java.lang.String encryptedKey) throws java.lang.Exception
private java.lang.String encode(byte[] bytes)
private byte[] decode(java.lang.String str)
private int indexOf(char[] array, char valueToFind)