PasswordBasedEncryptionStrategy instead, which follows the correct
way of transforming a string password into a cryptographic key@Deprecated 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
Deprecated.
|
algorithm, base64Encoding, decryptCipher, encryptCipher, keySpec, logger, secretKeyPHASE_NAME| Constructor and Description |
|---|
SecretKeyEncryptionStrategy()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected AlgorithmParameterSpec |
createAlgorithmParameterSpec()
Deprecated.
|
protected void |
createAndInitCiphers()
Deprecated.
|
protected KeySpec |
createKeySpec()
Deprecated.
|
SecretKeyFactory |
getKeyFactory()
Deprecated.
|
protected SecretKey |
getSecretKey()
Deprecated.
|
void |
initialise()
Deprecated.
Method used to perform any initialisation work.
|
void |
setKey(byte[] rawKey)
Deprecated.
|
void |
setKey(String rawKey)
Deprecated.
|
void |
setKeyFactory(SecretKeyFactory keyFactory)
Deprecated.
|
decrypt, decrypt, encrypt, encrypt, getAlgorithm, isBase64Encoding, setAlgorithm, setBase64Encoding, toStringgetName, setNamepublic static final String DEFAULT_ALGORITHM
public void initialise()
throws InitialisationException
InitialisableInitialisationException 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 Initialisableinitialise in class AbstractJCEEncryptionStrategyInitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered fromprotected void createAndInitCiphers()
throws GeneralSecurityException
createAndInitCiphers in class AbstractJCEEncryptionStrategyGeneralSecurityExceptionprotected KeySpec createKeySpec()
createKeySpec in class AbstractJCEEncryptionStrategyprotected AlgorithmParameterSpec createAlgorithmParameterSpec()
createAlgorithmParameterSpec in class AbstractJCEEncryptionStrategypublic 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 AbstractJCEEncryptionStrategyGeneralSecurityExceptionCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.