mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
Frame-at-a-time encryption.
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
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 given frame. */
|
||||
void writeFrame(byte[] b, int off, int len) throws IOException;
|
||||
|
||||
/** Encrypts and writes the remainder of the current frame. */
|
||||
void writeFinal(byte[] b) throws IOException;
|
||||
/** Flushes the output stream. */
|
||||
void flush() throws IOException;
|
||||
|
||||
/** Returns the maximum number of bytes that can be written. */
|
||||
long getRemainingCapacity();
|
||||
|
||||
Reference in New Issue
Block a user