public class PasswordBasedEncryptionStrategy extends AbstractJCEEncryptionStrategy
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ALGORITHM |
static int |
DEFAULT_ITERATION_COUNT |
algorithm, base64Encoding, decryptCipher, encryptCipher, keySpec, logger, secretKey
PHASE_NAME
Constructor and Description |
---|
PasswordBasedEncryptionStrategy() |
Modifier and Type | Method and Description |
---|---|
protected AlgorithmParameterSpec |
createAlgorithmParameterSpec() |
protected KeySpec |
createKeySpec() |
int |
getIterationCount() |
byte[] |
getSalt() |
protected SecretKey |
getSecretKey() |
void |
initialise()
Method used to perform any initialisation work.
|
void |
setIterationCount(int iterationCount) |
void |
setPassword(String password) |
void |
setSalt(byte[] salt) |
createAndInitCiphers, decrypt, decrypt, encrypt, encrypt, getAlgorithm, isBase64Encoding, setAlgorithm, setBase64Encoding, toString
getName, setName
public static final String DEFAULT_ALGORITHM
public static final int DEFAULT_ITERATION_COUNT
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 byte[] getSalt()
public void setSalt(byte[] salt)
public int getIterationCount()
public void setIterationCount(int iterationCount)
public void setPassword(String password)
protected SecretKey getSecretKey() throws GeneralSecurityException
getSecretKey
in class AbstractJCEEncryptionStrategy
GeneralSecurityException
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.