Package com.appslandia.common.crypto
Class TextEncryptor
- 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
-
Fields inherited from class com.appslandia.common.base.InitializeObject
mutex
-
-
Constructor Summary
Constructors Constructor Description TextEncryptor()TextEncryptor(Encryptor encryptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextEncryptorcopy()java.lang.Stringdecrypt(java.lang.String message)voiddestroy()java.lang.Stringencrypt(java.lang.String message)protected voidinit()TextEncryptorsetBaseEncoder(BaseEncoder baseEncoder)TextEncryptorsetEncryptor(Encryptor encryptor)TextEncryptorsetTextCharset(java.lang.String textCharset)TextEncryptorsetTextCharset(java.nio.charset.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 java.lang.Exception- Specified by:
initin classInitializeObject- Throws:
java.lang.Exception
-
encrypt
public java.lang.String encrypt(java.lang.String message) throws CryptoException- Throws:
CryptoException
-
decrypt
public java.lang.String decrypt(java.lang.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(java.nio.charset.Charset charset)
- Overrides:
setTextCharsetin classTextBasedCrypto
-
setTextCharset
public TextEncryptor setTextCharset(java.lang.String textCharset)
- Overrides:
setTextCharsetin classTextBasedCrypto
-
setBaseEncoder
public TextEncryptor setBaseEncoder(BaseEncoder baseEncoder)
- Overrides:
setBaseEncoderin classTextBasedCrypto
-
copy
public TextEncryptor copy()
-
-