mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
21 lines
596 B
Java
21 lines
596 B
Java
package net.sf.briar.transport;
|
|
|
|
import java.io.IOException;
|
|
import java.io.OutputStream;
|
|
|
|
/** Encrypts authenticated data to be sent over a connection. */
|
|
interface ConnectionEncrypter {
|
|
|
|
/** Returns an output stream to which unencrypted data can be written. */
|
|
OutputStream getOutputStream();
|
|
|
|
/** Encrypts and writes the MAC for the current frame. */
|
|
void writeMac(byte[] mac) throws IOException;
|
|
|
|
/**
|
|
* Returns the number of bytes that can be encrypted without outputting
|
|
* more than the given number of bytes, including encryption overhead.
|
|
*/
|
|
long getCapacity(long capacity);
|
|
}
|