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.


Constructor Summary
TestDrain()
           
 
Method Summary
static void main(java.lang.String[] arg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestDrain

public TestDrain()
Method Detail

main

public static void main(java.lang.String[] arg)
                 throws java.lang.Exception


Copyright (c) 1997-2001 Logi Ragnarsson - Distributed under the GPL