Package org.apache.commons.vfs2.util
Class DefaultCryptor
java.lang.Object
org.apache.commons.vfs2.util.DefaultCryptor
- All Implemented Interfaces:
Cryptor
Allows passwords to be encrypted and decrypted.
Warning: This uses AES128 with a fixed encryption key. This is only an obfuscation no cryptographic secure protection.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final char[]
private static final int
private static final byte[]
private static final char
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
HEX_CHARS
private static final char[] HEX_CHARS -
KEY_BYTES
private static final byte[] KEY_BYTES -
INDEX_NOT_FOUND
private static final int INDEX_NOT_FOUND- See Also:
-
BITS_IN_HALF_BYTE
private static final int BITS_IN_HALF_BYTE- See Also:
-
MASK
private static final char MASK- See Also:
-
-
Constructor Details
-
DefaultCryptor
public DefaultCryptor()
-
-
Method Details
-
encrypt
Encrypt the plain text password.Warning: This uses AES128 with a fixed encryption key. This is only an obfuscation no cryptographic secure protection.
-
decrypt
Decrypts the password. -
encode
Hex-encode bytes. -
decode
Decodes Hex-Bytes. -
indexOf
private int indexOf(char[] array, char valueToFind)
-