com.wizzardo.tools.security
Class AES

java.lang.Object
  extended by com.wizzardo.tools.security.AES

public class AES
extends java.lang.Object


Constructor Summary
AES()
           
AES(byte[] key)
           
AES(javax.crypto.SecretKey key)
          16 chars max, 128-bit encription
AES(java.lang.String key)
          16 chars max, 128-bit encription
 
Method Summary
 byte[] decrypt(byte[] b)
           
 void decrypt(java.io.InputStream in, java.io.OutputStream out)
           
 byte[] encrypt(byte[] b)
           
 void encrypt(java.io.InputStream in, java.io.OutputStream out)
           
static javax.crypto.SecretKey generateKey()
           
static javax.crypto.SecretKey generateKey(byte[] key)
          16 bytes max, 128-bit encription
static javax.crypto.SecretKey generateKey(java.lang.String key)
          16 chars max, 128-bit encription
static javax.crypto.SecretKey generateKeyAsMD5(java.lang.String key)
           
 byte[] toTransfer()
           
static byte[] toTransfer(javax.crypto.SecretKey key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AES

public AES()

AES

public AES(javax.crypto.SecretKey key)
16 chars max, 128-bit encription


AES

public AES(byte[] key)

AES

public AES(java.lang.String key)
16 chars max, 128-bit encription

Method Detail

generateKey

public static javax.crypto.SecretKey generateKey()

generateKey

public static javax.crypto.SecretKey generateKey(java.lang.String key)
16 chars max, 128-bit encription


generateKeyAsMD5

public static javax.crypto.SecretKey generateKeyAsMD5(java.lang.String key)

generateKey

public static javax.crypto.SecretKey generateKey(byte[] key)
16 bytes max, 128-bit encription


toTransfer

public byte[] toTransfer()

toTransfer

public static byte[] toTransfer(javax.crypto.SecretKey key)

decrypt

public byte[] decrypt(byte[] b)

encrypt

public byte[] encrypt(byte[] b)

decrypt

public void decrypt(java.io.InputStream in,
                    java.io.OutputStream out)

encrypt

public void encrypt(java.io.InputStream in,
                    java.io.OutputStream out)