public abstract class AbstractJCEEncryptionStrategy extends AbstractNamedEncryptionStrategy
Modifier and Type | Field and Description |
---|---|
protected String |
algorithm |
protected boolean |
base64Encoding |
protected Cipher |
decryptCipher |
protected Cipher |
encryptCipher |
protected KeySpec |
keySpec |
protected org.apache.commons.logging.Log |
logger
logger used by this class
|
protected SecretKey |
secretKey |
PHASE_NAME
Constructor and Description |
---|
AbstractJCEEncryptionStrategy() |
Modifier and Type | Method and Description |
---|---|
protected abstract AlgorithmParameterSpec |
createAlgorithmParameterSpec() |
protected abstract KeySpec |
createKeySpec() |
byte[] |
decrypt(byte[] data,
Object info) |
byte[] |
encrypt(byte[] data,
Object info) |
String |
getAlgorithm() |
protected abstract SecretKey |
getSecretKey() |
void |
initialise()
Method used to perform any initialisation work.
|
boolean |
isBase64Encoding() |
void |
setAlgorithm(String algorithm) |
void |
setBase64Encoding(boolean base64Encoding) |
String |
toString() |
getName, setName
protected transient org.apache.commons.logging.Log logger
protected KeySpec keySpec
protected SecretKey secretKey
protected Cipher encryptCipher
protected Cipher decryptCipher
protected String algorithm
protected boolean base64Encoding
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered fromprotected abstract SecretKey getSecretKey() throws GeneralSecurityException
GeneralSecurityException
public byte[] encrypt(byte[] data, Object info) throws CryptoFailureException
CryptoFailureException
public byte[] decrypt(byte[] data, Object info) throws CryptoFailureException
CryptoFailureException
public String getAlgorithm()
public void setAlgorithm(String algorithm)
public boolean isBase64Encoding()
public void setBase64Encoding(boolean base64Encoding)
protected abstract KeySpec createKeySpec()
protected abstract AlgorithmParameterSpec createAlgorithmParameterSpec()
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.