ch.elca.el4j.services.security.encryption
Class AESCipher

java.lang.Object
  extended by ch.elca.el4j.services.security.encryption.AESCipher

public class AESCipher
extends Object

This class can be used to en/decrypt Strings using the AES algorithm.

Author:
Stefan Wismer (SWI)
File-location:
AESCipher
Last check-in date:
2009-12-01 10:59:54 +0100 (Di, 01. Dez 2009) by jonasha for revision 4010

Constructor Summary
AESCipher(String base64encodedKey)
           
 
Method Summary
 String decrypt(String encryptedText)
           
 String encrypt(String plainText)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AESCipher

public AESCipher(String base64encodedKey)
Parameters:
base64encodedKey - a 128 bit AES key (base64 encoded) to use for en/decryption
Method Detail

encrypt

public String encrypt(String plainText)
Parameters:
plainText - plain text
Returns:
encrypted text

decrypt

public String decrypt(String encryptedText)
Parameters:
encryptedText - encrypted text
Returns:
decrypted text

main

public static void main(String[] args)
                 throws Exception
Parameters:
args - (no arguments expected)
Throws:
Exception


Copyright © 2005-2011 ELCA. All Rights Reserved.