public class EncryptedString extends Object
Constructor and Description |
---|
EncryptedString(String password)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String str)
Decrypt a given string.
|
String |
encrypt(String str)
Encrypt a given string.
|
boolean |
isEncrypted(String str)
Check if a string is encrypted or not.
|
public static final String EMPTY
public EncryptedString(String password) throws EncryptionException
password
- password used for encryption and decryptionEncryptionException
- crypto initialization exceptionpublic boolean isEncrypted(String str)
str
- string to checkpublic String decrypt(String str) throws EncryptionException
isEncrypted(String)
check with a truereturn value.
str
- string to decryptEncryptionException
- decryption errorpublic String encrypt(String str) throws EncryptionException
str
- string to be encryptedEncryptionException
- encryption errorCopyright © 2016. All Rights Reserved.