mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
Use the same maximum frame length for all transports.
This commit is contained in:
@@ -8,13 +8,12 @@ public interface StreamReaderFactory {
|
||||
* Creates an {@link java.io.InputStream InputStream} for reading from a
|
||||
* transport stream.
|
||||
*/
|
||||
InputStream createStreamReader(InputStream in, int maxFrameLength,
|
||||
StreamContext ctx);
|
||||
InputStream createStreamReader(InputStream in, StreamContext ctx);
|
||||
|
||||
/**
|
||||
* Creates an {@link java.io.InputStream InputStream} for reading from an
|
||||
* invitation stream.
|
||||
*/
|
||||
InputStream createInvitationStreamReader(InputStream in,
|
||||
int maxFrameLength, byte[] secret, boolean alice);
|
||||
byte[] secret, boolean alice);
|
||||
}
|
||||
|
||||
@@ -8,13 +8,12 @@ public interface StreamWriterFactory {
|
||||
* Creates an {@link java.io.OutputStream OutputStream} for writing to a
|
||||
* transport stream
|
||||
*/
|
||||
OutputStream createStreamWriter(OutputStream out, int maxFrameLength,
|
||||
StreamContext ctx);
|
||||
OutputStream createStreamWriter(OutputStream out, StreamContext ctx);
|
||||
|
||||
/**
|
||||
* Creates an {@link java.io.OutputStream OutputStream} for writing to an
|
||||
* invitation stream.
|
||||
*/
|
||||
OutputStream createInvitationStreamWriter(OutputStream out,
|
||||
int maxFrameLength, byte[] secret, boolean alice);
|
||||
byte[] secret, boolean alice);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ public interface TransportConstants {
|
||||
int TAG_LENGTH = 16;
|
||||
|
||||
/** The maximum length of a frame in bytes, including the header and MAC. */
|
||||
int MAX_FRAME_LENGTH = 32768; // 2^15, 32 KiB
|
||||
int MAX_FRAME_LENGTH = 1024;
|
||||
|
||||
/** The length of the initalisation vector (IV) in bytes. */
|
||||
int IV_LENGTH = 12;
|
||||
|
||||
Reference in New Issue
Block a user