org.logi.crypto.test
Class TestDrain
java.lang.Object
org.logi.crypto.test.TestDrain
- public class TestDrain
- extends java.lang.Object
Tests the DecryptStream.drain() method. One thread writes bytes to an
EncryptStream working in a block mode, while another receives the
ciphertext, decrypts it and drains in the appropriate places.
The flush() and drain() methods work correctly iff the program outputs
lines of the form [n] 0 1 2 ... n-1. The bottleneck will be the
random number generator used for padding the blocks and may cause the
program to run jerkily while it collects entropy.
Method Summary |
static void |
main(java.lang.String[] arg)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestDrain
public TestDrain()
main
public static void main(java.lang.String[] arg)
throws java.lang.Exception
- Throws:
java.lang.Exception