Package org.apache.fulcrum.jce.crypto
Class CryptoUtilTest
- java.lang.Object
-
- org.apache.fulcrum.jce.crypto.CryptoUtilTest
-
public class CryptoUtilTest extends Object
Test suite for crypto functionality- Author:
- Siegfried Goeschl
-
-
Constructor Summary
Constructors Constructor Description CryptoUtilTest()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected char[]
getPassword()
protected File
getTempDataDirectory()
protected File
getTestDataDirectory()
protected static void
setUp()
void
testBinaryHandling()
Test encryption and decryption of binary datavoid
testEmptyTextDecryption()
Decrypt a text filevoid
testEmptyTextEncryption()
Encrypt an empty text filevoid
testHexConverter()
Test the hex convertervoid
testPasswordEncryption()
Test encryption and decryption of Stringsvoid
testPasswordFactory()
Test creating a passwordvoid
testPdfDecryption()
Decrypt a PDF filevoid
testPdfEncryption()
Encrypt a PDF filevoid
testStringEncryption()
Test encryption and decryption of Stringsvoid
testStringEncryptionWithType()
void
testStringHandling()
Test encryption and decryption of Stringsvoid
testTextDecryption()
Decrypt a text filevoid
testTextEncryption()
Encrypt a text filevoid
testXmlISO88591Decryption()
Decrypt a ISO-8859-1 XML filevoid
testXmlISO88591Encryption()
Encrypt a ISO-8859-1 XML filevoid
testXMLUTF16Decryption()
Decrypt a UTF-16 XML filevoid
testXmlUTF16Encryption()
Encrypt a UTF-16 XML filevoid
testXMLUTF8Decryption()
Decrypt a UTF-8 XML filevoid
testXmlUTF8Encryption()
Encrypt a UTF-8 XML filevoid
testZipDecryption()
Decrypt a ZIP filevoid
testZipEncryption()
Encrypt a ZIP file
-
-
-
Constructor Detail
-
CryptoUtilTest
public CryptoUtilTest()
Constructor
-
-
Method Detail
-
setUp
@BeforeAll protected static void setUp() throws Exception
- Throws:
Exception
- Generic exception
-
getPassword
protected char[] getPassword()
- Returns:
- Returns the password.
-
getTempDataDirectory
protected File getTempDataDirectory()
- Returns:
- Returns the tempDataDirectory.
-
getTestDataDirectory
protected File getTestDataDirectory()
- Returns:
- Returns the testDataDirectory.
-
testTextEncryption
@Test public void testTextEncryption()
Encrypt a text file
-
testTextDecryption
@Test public void testTextDecryption()
Decrypt a text file
-
testEmptyTextEncryption
@Test public void testEmptyTextEncryption()
Encrypt an empty text file
-
testEmptyTextDecryption
@Test public void testEmptyTextDecryption()
Decrypt a text file
-
testPdfEncryption
@Test public void testPdfEncryption()
Encrypt a PDF file
-
testPdfDecryption
@Test public void testPdfDecryption()
Decrypt a PDF file
-
testZipEncryption
@Test public void testZipEncryption()
Encrypt a ZIP file
-
testZipDecryption
@Test public void testZipDecryption()
Decrypt a ZIP file
-
testXmlUTF16Encryption
@Test public void testXmlUTF16Encryption()
Encrypt a UTF-16 XML file
-
testXMLUTF16Decryption
@Test public void testXMLUTF16Decryption()
Decrypt a UTF-16 XML file
-
testXmlUTF8Encryption
@Test public void testXmlUTF8Encryption()
Encrypt a UTF-8 XML file
-
testXMLUTF8Decryption
@Test public void testXMLUTF8Decryption()
Decrypt a UTF-8 XML file
-
testXmlISO88591Encryption
@Test public void testXmlISO88591Encryption()
Encrypt a ISO-8859-1 XML file
-
testXmlISO88591Decryption
@Test public void testXmlISO88591Decryption()
Decrypt a ISO-8859-1 XML file
-
testStringEncryption
@Test public void testStringEncryption()
Test encryption and decryption of Strings
-
testStringEncryptionWithType
@Test public void testStringEncryptionWithType()
-
testStringHandling
@Test public void testStringHandling()
Test encryption and decryption of Strings
-
testBinaryHandling
@Test public void testBinaryHandling() throws Exception
Test encryption and decryption of binary data- Throws:
Exception
- Generic exception
-
testPasswordFactory
@Test public void testPasswordFactory() throws Exception
Test creating a password- Throws:
Exception
- Generic exception
-
testHexConverter
@Test public void testHexConverter() throws Exception
Test the hex converter- Throws:
Exception
- Generic exception
-
testPasswordEncryption
@Test public void testPasswordEncryption() throws Exception
Test encryption and decryption of Strings- Throws:
Exception
- Generic exception
-
-