mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Unit tests for PaddedConnectionWriter. Also broke some shared test
code out into separate classes.
This commit is contained in:
22
test/net/sf/briar/transport/NullConnectionEncrypter.java
Normal file
22
test/net/sf/briar/transport/NullConnectionEncrypter.java
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user