mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Plaintext frames don't need to include space for the MAC.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package net.sf.briar.transport;
|
||||
|
||||
import static net.sf.briar.api.transport.TransportConstants.HEADER_LENGTH;
|
||||
import static net.sf.briar.api.transport.TransportConstants.MAC_LENGTH;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -16,7 +17,7 @@ class ConnectionReaderImpl extends InputStream implements ConnectionReader {
|
||||
|
||||
ConnectionReaderImpl(FrameReader in, int frameLength) {
|
||||
this.in = in;
|
||||
frame = new byte[frameLength];
|
||||
frame = new byte[frameLength - MAC_LENGTH];
|
||||
}
|
||||
|
||||
public InputStream getInputStream() {
|
||||
|
||||
@@ -27,7 +27,7 @@ class ConnectionWriterImpl extends OutputStream implements ConnectionWriter {
|
||||
ConnectionWriterImpl(FrameWriter out, int frameLength) {
|
||||
this.out = out;
|
||||
this.frameLength = frameLength;
|
||||
frame = new byte[frameLength];
|
||||
frame = new byte[frameLength - MAC_LENGTH];
|
||||
}
|
||||
|
||||
public OutputStream getOutputStream() {
|
||||
|
||||
Reference in New Issue
Block a user