mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Expose the encryption and authentication overhead without breaking
encapsulation. This should allow callers to calculate maximum packet sizes without knowing the details of the transport protocol.
This commit is contained in:
@@ -11,4 +11,11 @@ interface ConnectionEncrypter {
|
||||
|
||||
/** Encrypts and writes the MAC for the current frame. */
|
||||
void writeMac(byte[] mac) throws IOException;
|
||||
|
||||
/**
|
||||
* Returns the number of encrypted bytes that can be written without
|
||||
* writing more than the given number of bytes, including encryption
|
||||
* overhead.
|
||||
*/
|
||||
long getCapacity(long capacity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user