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, secretKey
PHASE_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, 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 void createAndInitCiphers() throws GeneralSecurityException
createAndInitCiphers
in class AbstractJCEEncryptionStrategy
GeneralSecurityException
protected 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–2015 MuleSoft, Inc.. All rights reserved.