ibspan.tss.agents.sha.session
Class DesEncrypter

java.lang.Object
  extended by ibspan.tss.agents.sha.session.DesEncrypter

public class DesEncrypter
extends Object

Simple class realizing DES-encrypting and decrypting procedures.

Author:
Patrick Chan, Maciej Gawinecki

Constructor Summary
DesEncrypter(SecretKey key)
          Constructs DesEncrypter.
 
Method Summary
 String decrypt(String str)
          Returns the given string, which was previously DES-encrypted with this DesEncrypter, in a plain text form.
 String encrypt(String str)
          Returns the given string in a DES-encrypted form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesEncrypter

public DesEncrypter(SecretKey key)
Constructs DesEncrypter.

Parameters:
key - is the A secret (symmetric) key which will be used to initialize encrypting and decrypting procedures.
Method Detail

encrypt

public String encrypt(String str)
Returns the given string in a DES-encrypted form.

Parameters:
str - is a plain text to be encrypted
Returns:
encrypted form of a given string.

decrypt

public String decrypt(String str)
Returns the given string, which was previously DES-encrypted with this DesEncrypter, in a plain text form.

Parameters:
str - is encrypted text to be descrypted.
Returns:
plain text