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| 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.
|
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 org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableinitialise in class AbstractJCEEncryptionStrategyorg.mule.runtime.api.lifecycle.InitialisationExceptionprotected 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–2017 MuleSoft, Inc.. All rights reserved.