org.silverpeas.util.crypto
Class AESCipherTest

java.lang.Object
  extended by org.silverpeas.util.crypto.AESCipherTest

public class AESCipherTest
extends Object

Unit tests on the AES cipher as implemented in Silverpeas. The implemented AES cipher uses a random IV (Initialization Vector) at each text encryption. So, in order this vector is available in the cipher's decryption, it is embedded in the computed encrypted data. that means this AES cipher cannot decrypt a ciphertext coming from another AES cipher as well another cipher cannot decrypt the encrypted data computed by the Silverpeas AES cipher.


Constructor Summary
AESCipherTest()
           
 
Method Summary
static void loadJCRProvider()
           
 void setUp()
           
 void testDecrypt()
           
 void testEncrypt()
           
 void testEncryptionThenDecryption()
           
 void testGetAlgorithmName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AESCipherTest

public AESCipherTest()
Method Detail

loadJCRProvider

public static final void loadJCRProvider()

setUp

public void setUp()
           throws Exception
Throws:
Exception

testGetAlgorithmName

public void testGetAlgorithmName()
                          throws Exception
Throws:
Exception

testEncrypt

public void testEncrypt()
                 throws Exception
Throws:
Exception

testDecrypt

public void testDecrypt()
                 throws Exception
Throws:
Exception

testEncryptionThenDecryption

public void testEncryptionThenDecryption()
                                  throws Exception
Throws:
Exception


Copyright © 2016 Silverpeas. All Rights Reserved.