Package com.logicaldoc.util.security
Class StringEncrypter
- java.lang.Object
-
- com.logicaldoc.util.security.StringEncrypter
-
public class StringEncrypter extends Object
Utility class to encrypt/decrypt strings- Since:
- 6.5
- Author:
- Marco Meschieri - LogicalDOC
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StringEncrypter.EncryptionException
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ENCRYPTION_KEY
static String
DES_ENCRYPTION_SCHEME
static String
DESEDE_ENCRYPTION_SCHEME
-
Constructor Summary
Constructors Constructor Description StringEncrypter(String encryptionScheme)
StringEncrypter(String encryptionScheme, String encryptionKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
decrypt(String encryptedString)
String
encrypt(String unencryptedString)
static void
main(String[] args)
-
-
-
Field Detail
-
DESEDE_ENCRYPTION_SCHEME
public static final String DESEDE_ENCRYPTION_SCHEME
- See Also:
- Constant Field Values
-
DES_ENCRYPTION_SCHEME
public static final String DES_ENCRYPTION_SCHEME
- See Also:
- Constant Field Values
-
DEFAULT_ENCRYPTION_KEY
public static final String DEFAULT_ENCRYPTION_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StringEncrypter
public StringEncrypter(String encryptionScheme) throws StringEncrypter.EncryptionException
-
StringEncrypter
public StringEncrypter(String encryptionScheme, String encryptionKey) throws StringEncrypter.EncryptionException
-
-
Method Detail
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
encrypt
public String encrypt(String unencryptedString) throws StringEncrypter.EncryptionException
-
decrypt
public String decrypt(String encryptedString) throws StringEncrypter.EncryptionException
-
-