- java.lang.Object
-
- com.appslandia.common.base.InitializeObject
-
- com.appslandia.common.crypto.TextBasedCrypto
-
- com.appslandia.common.crypto.TextEncryptor
-
- All Implemented Interfaces:
InitializeSupport
public class TextEncryptor extends TextBasedCrypto
- Author:
- Loc Ha
-
-
Field Summary
-
Fields inherited from class com.appslandia.common.crypto.TextBasedCrypto
baseEncoder, textCharset
-
-
Constructor Summary
Constructors Constructor Description TextEncryptor()TextEncryptor(Encryptor encryptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextEncryptorcopy()Stringdecrypt(String message)voiddestroy()Stringencrypt(String message)protected voidinit()TextEncryptorsetBaseEncoder(BaseEncoder baseEncoder)TextEncryptorsetEncryptor(Encryptor encryptor)TextEncryptorsetTextCharset(String textCharset)TextEncryptorsetTextCharset(Charset charset)-
Methods inherited from class com.appslandia.common.crypto.TextBasedCrypto
setBaseEncoder
-
Methods inherited from class com.appslandia.common.base.InitializeObject
assertNotInitialized, initialize
-
-
-
-
Constructor Detail
-
TextEncryptor
public TextEncryptor()
-
TextEncryptor
public TextEncryptor(Encryptor encryptor)
-
-
Method Detail
-
init
protected void init() throws Exception- Specified by:
initin classInitializeObject- Throws:
Exception
-
encrypt
public String encrypt(String message) throws CryptoException
- Throws:
CryptoException
-
decrypt
public String decrypt(String message) throws CryptoException
- Throws:
CryptoException
-
destroy
public void destroy() throws DestroyException- Specified by:
destroyin interfaceInitializeSupport- Overrides:
destroyin classInitializeObject- Throws:
DestroyException
-
setEncryptor
public TextEncryptor setEncryptor(Encryptor encryptor)
-
setTextCharset
public TextEncryptor setTextCharset(Charset charset)
- Overrides:
setTextCharsetin classTextBasedCrypto
-
setTextCharset
public TextEncryptor setTextCharset(String textCharset)
- Overrides:
setTextCharsetin classTextBasedCrypto
-
setBaseEncoder
public TextEncryptor setBaseEncoder(BaseEncoder baseEncoder)
- Overrides:
setBaseEncoderin classTextBasedCrypto
-
copy
public TextEncryptor copy()
-
-