Keel 2.1RC2

org.keel.services.crypto.des
Class DES

java.lang.Object
  extended byorg.keel.services.crypto.AbstractEncryptor
      extended byorg.keel.services.crypto.des.DES
All Implemented Interfaces:
Configurable, Encryptor

public class DES
extends AbstractEncryptor
implements Configurable


Field Summary
private  int count
           
private  java.lang.String keyString
           
private static java.lang.String method
           
private  javax.crypto.spec.PBEParameterSpec pbeParameterSpec
           
private  byte[] salt
           
 
Fields inherited from class org.keel.services.crypto.AbstractEncryptor
ROLE
 
Constructor Summary
DES()
           
 
Method Summary
 void configure(Configuration newConf)
          Pass the Configuration to the Configurable class.
 byte[] decrypt(byte[] inputData)
          Decrypt the data according to the appropriate algorithm.
 byte[] encrypt(byte[] inputData)
          Encrypt the specified data according to the appropriate algorithm.
private  javax.crypto.SecretKey getKey()
           
 void setKey(java.lang.String newKey)
          Set the encryption key - if this algorithm uses such a key
 
Methods inherited from class org.keel.services.crypto.AbstractEncryptor
hash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keyString

private java.lang.String keyString

method

private static final java.lang.String method
See Also:
Constant Field Values

salt

private byte[] salt

count

private final int count
See Also:
Constant Field Values

pbeParameterSpec

private javax.crypto.spec.PBEParameterSpec pbeParameterSpec
Constructor Detail

DES

public DES()
Method Detail

getKey

private javax.crypto.SecretKey getKey()
                               throws java.lang.Exception
Throws:
java.lang.Exception

decrypt

public byte[] decrypt(byte[] inputData)
               throws NestedException
Description copied from interface: Encryptor
Decrypt the data according to the appropriate algorithm.

Specified by:
decrypt in interface Encryptor
Specified by:
decrypt in class AbstractEncryptor
Throws:
NestedException

encrypt

public byte[] encrypt(byte[] inputData)
               throws NestedException
Description copied from interface: Encryptor
Encrypt the specified data according to the appropriate algorithm.

Specified by:
encrypt in interface Encryptor
Specified by:
encrypt in class AbstractEncryptor
Returns:
Throws:
ChainedException
NestedException

setKey

public void setKey(java.lang.String newKey)
Description copied from interface: Encryptor
Set the encryption key - if this algorithm uses such a key

Specified by:
setKey in interface Encryptor
Specified by:
setKey in class AbstractEncryptor

configure

public void configure(Configuration newConf)
               throws ConfigurationException
Description copied from interface: Configurable
Pass the Configuration to the Configurable class.

Specified by:
configure in interface Configurable
Parameters:
newConf - the class configurations. Must not be null.
Throws:
ConfigurationException - if an error occurs

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.