arcade.security.util
Class SimpleEncryption

java.lang.Object
  extended by arcade.security.util.SimpleEncryption

public class SimpleEncryption
extends java.lang.Object

Simple encryption using symmetric keys


Constructor Summary
SimpleEncryption()
           
 
Method Summary
 java.lang.String decrypt(byte[] encryptedText)
           
 byte[] encrypt(java.lang.String originalText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleEncryption

public SimpleEncryption()
                 throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

encrypt

public byte[] encrypt(java.lang.String originalText)
               throws java.security.InvalidKeyException,
                      javax.crypto.BadPaddingException,
                      javax.crypto.IllegalBlockSizeException
Throws:
java.security.InvalidKeyException
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException

decrypt

public java.lang.String decrypt(byte[] encryptedText)
                         throws java.security.InvalidKeyException,
                                javax.crypto.BadPaddingException,
                                javax.crypto.IllegalBlockSizeException
Throws:
java.security.InvalidKeyException
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException