org.keel.services.crypto.des
Class DES
java.lang.Object
org.keel.services.crypto.AbstractEncryptor
org.keel.services.crypto.des.DES
- All Implemented Interfaces:
- Configurable, Encryptor
- public class DES
- extends AbstractEncryptor
- implements Configurable
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
-
DES
public DES()
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
Please see keelframework.org for information about new Keel releases.