|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.elca.el4j.tests.services.security.RSAEncryptionTest
public class RSAEncryptionTest
This class tests the encryption and decryption using RSA.
| Field Summary | |
|---|---|
private RSACipher |
m_cipher
The cipher used for en- and decryption. |
private String |
m_text
The text that will be en- and decrypted. |
| Constructor Summary | |
|---|---|
RSAEncryptionTest()
|
|
| Method Summary | |
|---|---|
void |
setUp()
Generates a cipher with a key. |
void |
testDiffEnDecryption()
Encrypts a text, modifies the encrypted text, decrypts it and checks if the result is really different from the original input. |
void |
testEnDecryption()
Encrypts and then decrypts a text and checks if the result of the decryption equals the input of the encryption (= the original text). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private RSACipher m_cipher
private String m_text
| Constructor Detail |
|---|
public RSAEncryptionTest()
| Method Detail |
|---|
public void setUp()
throws Exception
Exceptionpublic void testEnDecryption()
public void testDiffEnDecryption()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||