org.silverpeas.util.crypto
Class CAST5CipherTest

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

public class CAST5CipherTest
extends Object

Unit tests on the CAST5 cipher as implemented in Silverpeas. The implemented CAST5 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 CAST5 cipher cannot decrypt a ciphertext coming from another CAST5 cipher as well another cipher cannot decrypt the encrypted data computed by the Silverpeas CAST5 cipher.


Constructor Summary
CAST5CipherTest()
           
 
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

CAST5CipherTest

public CAST5CipherTest()
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.