Package nl.gx.webmanager.handler.util
Class CipherPool
- java.lang.Object
-
- nl.gx.webmanager.handler.util.CipherPool
-
public class CipherPool extends Object
Object pool for ciphers. After calling the init method, the objects are as good as new
-
-
Constructor Summary
Constructors Constructor Description CipherPool(String algorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
decrypt(byte[] encodedBytes, byte[] key)
byte[]
encrypt(byte[] message, byte[] key)
-
-
-
Constructor Detail
-
CipherPool
public CipherPool(String algorithm)
-
-
Method Detail
-
encrypt
public byte[] encrypt(byte[] message, byte[] key) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
decrypt
public byte[] decrypt(byte[] encodedBytes, byte[] key) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
-