com.gsoft.titration.client
Class EncryptionUtility


public class EncryptionUtility

This class is to be used by CoreDataResources to store
the algorythm for encryption and decryption of String variables.
It is a quick hack, and needs a lot of work.


Inner Class Summary
 (package private) classEncryptionUtility.DefaultEncryptionAlgorithm
           

Field Summary
 private EncryptionAlgorithmAlgorithm
          Encryption Algorythm used to encrypt and decrypt

Method Summary
 Stringdecrypt(String cryptogram)
          Will return the encrypted String clear
using the currently set algorythm.
 Stringencrypt(String word)
          Will encrypt and return the clear String
Using the currently set algorythm.
 EncryptionAlgorithmgetEncryptionAlgorithm()
          Returns the EncryptionAlgorythm used by the Utility
 static voidmain(String[] args)
           
 voidsetEncryptionAlgorithm(EncryptionAlgorithm alg)
          Sets the EncryptionAlgorythm for the Utility

Field Detail

Algorithm

private EncryptionAlgorithm Algorithm
Encryption Algorythm used to encrypt and decrypt
Method Detail

decrypt

public String decrypt(String cryptogram)
Will return the encrypted String clear
using the currently set algorythm.

encrypt

public String encrypt(String word)
Will encrypt and return the clear String
Using the currently set algorythm.

getEncryptionAlgorithm

public EncryptionAlgorithm getEncryptionAlgorithm()
Returns the EncryptionAlgorythm used by the Utility

main

public static void main(String[] args)

setEncryptionAlgorithm

public void setEncryptionAlgorithm(EncryptionAlgorithm alg)
Sets the EncryptionAlgorythm for the Utility