- java.lang.Object
-
- com.appslandia.common.base.InitializeObject
-
- com.appslandia.common.crypto.PoolEncryptor
-
- All Implemented Interfaces:
InitializeSupport,Encryptor
public class PoolEncryptor extends InitializeObject implements Encryptor
- Author:
- Loc Ha
-
-
Constructor Summary
Constructors Constructor Description PoolEncryptor()PoolEncryptor(Encryptor encryptor)PoolEncryptor(Encryptor encryptor, int poolSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PoolEncryptorcopy()byte[]decrypt(byte[] message)byte[]decrypt(byte[] message, byte[] salt)voiddestroy()byte[]encrypt(byte[] message)byte[]encrypt(byte[] message, Out<byte[]> salt)protected voidinit()PoolEncryptorsetEncryptor(Encryptor encryptor)PoolEncryptorsetPoolSize(int poolSize)-
Methods inherited from class com.appslandia.common.base.InitializeObject
assertNotInitialized, initialize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.appslandia.common.base.InitializeSupport
initialize
-
-
-
-
Method Detail
-
init
protected void init() throws Exception- Specified by:
initin classInitializeObject- Throws:
Exception
-
destroy
public void destroy() throws DestroyException- Specified by:
destroyin interfaceInitializeSupport- Overrides:
destroyin classInitializeObject- Throws:
DestroyException
-
encrypt
public byte[] encrypt(byte[] message) throws CryptoException- Specified by:
encryptin interfaceEncryptor- Throws:
CryptoException
-
decrypt
public byte[] decrypt(byte[] message) throws CryptoException- Specified by:
decryptin interfaceEncryptor- Throws:
CryptoException
-
encrypt
public byte[] encrypt(byte[] message, Out<byte[]> salt) throws CryptoException- Specified by:
encryptin interfaceEncryptor- Throws:
CryptoException
-
decrypt
public byte[] decrypt(byte[] message, byte[] salt) throws CryptoException- Specified by:
decryptin interfaceEncryptor- Throws:
CryptoException
-
setEncryptor
public PoolEncryptor setEncryptor(Encryptor encryptor)
-
setPoolSize
public PoolEncryptor setPoolSize(int poolSize)
-
copy
public PoolEncryptor copy()
-
-