Unit tests for segmented encrypter and decrypter.

This commit is contained in:
akwizgran
2012-01-13 13:06:43 +00:00
parent 90e54d94e6
commit d0e402062a
8 changed files with 189 additions and 26 deletions

View File

@@ -11,6 +11,9 @@ import net.sf.briar.api.plugins.FrameSource;
public interface DuplexSegmentedTransportConnection extends FrameSource,
FrameSink {
/** Returns the maximum length of a segment in bytes. */
int getMaximumSegmentLength();
/**
* Returns true if the output stream should be flushed after each packet.
*/

View File

@@ -1,14 +1,19 @@
package net.sf.briar.api.plugins.simplex;
import net.sf.briar.api.plugins.FrameSink;
/**
* An interface for writing data to a simplex segmented transport. The writer is
* not responsible for authenticating or encrypting the data before writing it.
*/
public interface SimplexSegmentedTransportWriter {
public interface SimplexSegmentedTransportWriter extends FrameSink {
/** Returns the capacity of the transport in bytes. */
long getCapacity();
/** Returns the maximum length of a segment in bytes. */
int getMaximumSegmentLength();
/**
* Returns true if the output stream should be flushed after each packet.
*/