public class SecretKeyEncryptionStrategy extends AbstractJCEEncryptionStrategy
SecretKeyFactory
and must return a
byte array. The default algorthm used by this strategy is Blowfish, but users can
specify any valid algorithm supported by JCE.SecretKeyFactory
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ALGORITHM |
algorithm, base64Encoding, decryptCipher, encryptCipher, keySpec, logger, secretKey
PHASE_NAME
Constructor and Description |
---|
SecretKeyEncryptionStrategy() |
Modifier and Type | Method and Description |
---|---|
protected AlgorithmParameterSpec |
createAlgorithmParameterSpec() |
protected KeySpec |
createKeySpec() |
SecretKeyFactory |
getKeyFactory() |
protected SecretKey |
getSecretKey() |
void |
initialise()
Method used to perform any initialisation work.
|
void |
setKey(byte[] rawKey) |
void |
setKey(String rawKey) |
void |
setKeyFactory(SecretKeyFactory keyFactory) |
decrypt, encrypt, getAlgorithm, isBase64Encoding, setAlgorithm, setBase64Encoding, toString
getName, setName
public static final String DEFAULT_ALGORITHM
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.initialise
in interface Initialisable
initialise
in class AbstractJCEEncryptionStrategy
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered fromprotected KeySpec createKeySpec()
createKeySpec
in class AbstractJCEEncryptionStrategy
protected AlgorithmParameterSpec createAlgorithmParameterSpec()
createAlgorithmParameterSpec
in class AbstractJCEEncryptionStrategy
public void setKey(byte[] rawKey)
public void setKey(String rawKey)
public SecretKeyFactory getKeyFactory()
public void setKeyFactory(SecretKeyFactory keyFactory)
protected SecretKey getSecretKey() throws GeneralSecurityException
getSecretKey
in class AbstractJCEEncryptionStrategy
GeneralSecurityException
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.