org.mule.impl.security
Class PasswordBasedEncryptionStrategy

java.lang.Object
  extended byorg.mule.impl.security.PasswordBasedEncryptionStrategy
All Implemented Interfaces:
Initialisable, UMOEncryptionStrategy

public class PasswordBasedEncryptionStrategy
extends java.lang.Object
implements UMOEncryptionStrategy

PasswordBasedEncryptionStrategy uses password-based encryption to encrypt and decrypt data. Developers can set the salt, iternationCount password and algorythm on this stragetgy, but on the password in plain text is required.

Version:
$Revision: 1.2 $
Author:
Ross Mason

Field Summary
protected static Log logger
          logger used by this class
 
Constructor Summary
PasswordBasedEncryptionStrategy()
           
 
Method Summary
 byte[] decrypt(byte[] data)
           
 byte[] encrypt(byte[] data)
           
 java.lang.String getAlgorithm()
           
 int getIterationCount()
           
 char[] getPassword()
           
 byte[] getSalt()
           
 void initialise()
           
 boolean isBase64Encoding()
           
 void setAlgorithm(java.lang.String algorithm)
           
 void setBase64Encoding(boolean base64Encoding)
           
 void setIterationCount(int iterationCount)
           
 void setPassword(char[] password)
           
 void setPassword(java.lang.String password)
           
 void setSalt(byte[] salt)
           
 void setSalt(java.lang.String salt)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static transient Log logger
logger used by this class

Constructor Detail

PasswordBasedEncryptionStrategy

public PasswordBasedEncryptionStrategy()
Method Detail

initialise

public void initialise()
                throws InitialisationException
Specified by:
initialise in interface Initialisable
Throws:
InitialisationException

encrypt

public byte[] encrypt(byte[] data)
               throws CryptoFailureException
Specified by:
encrypt in interface UMOEncryptionStrategy
Throws:
CryptoFailureException

decrypt

public byte[] decrypt(byte[] data)
               throws CryptoFailureException
Specified by:
decrypt in interface UMOEncryptionStrategy
Throws:
CryptoFailureException

getAlgorithm

public java.lang.String getAlgorithm()

setAlgorithm

public void setAlgorithm(java.lang.String algorithm)

getSalt

public byte[] getSalt()

setSalt

public void setSalt(byte[] salt)

setSalt

public void setSalt(java.lang.String salt)

getIterationCount

public int getIterationCount()

setIterationCount

public void setIterationCount(int iterationCount)

getPassword

public char[] getPassword()

setPassword

public void setPassword(java.lang.String password)

setPassword

public void setPassword(char[] password)

toString

public java.lang.String toString()

isBase64Encoding

public boolean isBase64Encoding()

setBase64Encoding

public void setBase64Encoding(boolean base64Encoding)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.