Unit tests for PaddedConnectionWriter. Also broke some shared test

code out into separate classes.
This commit is contained in:
akwizgran
2011-08-19 19:47:24 +02:00
parent 4e2a74858b
commit d11f7ef824
6 changed files with 252 additions and 99 deletions

View File

@@ -0,0 +1,22 @@
package net.sf.briar.transport;
import java.io.IOException;
import java.io.OutputStream;
/** A ConnectionEncrypter that performs no encryption. */
class NullConnectionEncrypter implements ConnectionEncrypter {
private final OutputStream out;
NullConnectionEncrypter(OutputStream out) {
this.out = out;
}
public OutputStream getOutputStream() {
return out;
}
public void writeMac(byte[] mac) throws IOException {
out.write(mac);
}
}