Files
briar/components/net/sf/briar/transport/ConnectionEncrypter.java
akwizgran eba6884281 Javadocs.
2011-09-21 18:09:56 +01:00

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);
}