mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Renamed a couple of classes.
This commit is contained in:
@@ -224,7 +224,8 @@ public class ConnectionReaderImplTest extends TransportTest {
|
||||
IncomingAuthenticationLayer authentication =
|
||||
new IncomingAuthenticationLayerImpl(correction, mac, macKey);
|
||||
IncomingReliabilityLayer reliability =
|
||||
new NullIncomingReliabilityLayer(authentication);
|
||||
new IncomingReliabilityLayerImpl(authentication,
|
||||
new NullFrameWindow());
|
||||
return new ConnectionReaderImpl(reliability, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,8 @@ public class FrameReadWriteTest extends BriarTestCase {
|
||||
IncomingAuthenticationLayer authenticationIn =
|
||||
new IncomingAuthenticationLayerImpl(correctionIn, mac, macKey);
|
||||
IncomingReliabilityLayer reliabilityIn =
|
||||
new NullIncomingReliabilityLayer(authenticationIn);
|
||||
new IncomingReliabilityLayerImpl(authenticationIn,
|
||||
new NullFrameWindow());
|
||||
ConnectionReader reader = new ConnectionReaderImpl(reliabilityIn,
|
||||
false);
|
||||
InputStream in1 = reader.getInputStream();
|
||||
|
||||
@@ -22,12 +22,12 @@ import org.junit.Test;
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
public class IncomingSegmentedEncryptionLayerTest extends BriarTestCase {
|
||||
public class SegmentedIncomingEncryptionLayerTest extends BriarTestCase {
|
||||
|
||||
private final Cipher tagCipher, segCipher;
|
||||
private final ErasableKey tagKey, segKey;
|
||||
|
||||
public IncomingSegmentedEncryptionLayerTest() {
|
||||
public SegmentedIncomingEncryptionLayerTest() {
|
||||
super();
|
||||
Injector i = Guice.createInjector(new CryptoModule());
|
||||
CryptoComponent crypto = i.getInstance(CryptoComponent.class);
|
||||
@@ -65,7 +65,7 @@ public class IncomingSegmentedEncryptionLayerTest extends BriarTestCase {
|
||||
SegmentSource in = new ByteArraySegmentSource(ciphertext1);
|
||||
// Use the encryption layer to decrypt the ciphertext
|
||||
IncomingEncryptionLayer decrypter =
|
||||
new IncomingSegmentedEncryptionLayer(in, tagCipher, segCipher,
|
||||
new SegmentedIncomingEncryptionLayer(in, tagCipher, segCipher,
|
||||
tagKey, segKey, false, buffered);
|
||||
// First segment
|
||||
Segment s = new SegmentImpl();
|
||||
@@ -116,7 +116,7 @@ public class IncomingSegmentedEncryptionLayerTest extends BriarTestCase {
|
||||
SegmentSource in = new ByteArraySegmentSource(ciphertext1);
|
||||
// Use the encryption layer to decrypt the ciphertext
|
||||
IncomingEncryptionLayer decrypter =
|
||||
new IncomingSegmentedEncryptionLayer(in, tagCipher, segCipher,
|
||||
new SegmentedIncomingEncryptionLayer(in, tagCipher, segCipher,
|
||||
tagKey, segKey, true, buffered);
|
||||
// First segment
|
||||
Segment s = new SegmentImpl();
|
||||
@@ -22,14 +22,14 @@ import org.junit.Test;
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
public class OutgoingSegmentedEncryptionLayerTest extends BriarTestCase {
|
||||
public class SegmentedOutgoingEncryptionLayerTest extends BriarTestCase {
|
||||
|
||||
private static final int MAC_LENGTH = 32;
|
||||
|
||||
private final Cipher tagCipher, segCipher;
|
||||
private final ErasableKey tagKey, segKey;
|
||||
|
||||
public OutgoingSegmentedEncryptionLayerTest() {
|
||||
public SegmentedOutgoingEncryptionLayerTest() {
|
||||
super();
|
||||
Injector i = Guice.createInjector(new CryptoModule());
|
||||
CryptoComponent crypto = i.getInstance(CryptoComponent.class);
|
||||
@@ -65,7 +65,7 @@ public class OutgoingSegmentedEncryptionLayerTest extends BriarTestCase {
|
||||
// Use the encryption layer to encrypt the plaintext
|
||||
ByteArraySegmentSink sink = new ByteArraySegmentSink();
|
||||
OutgoingEncryptionLayer encrypter =
|
||||
new OutgoingSegmentedEncryptionLayer(sink, Long.MAX_VALUE,
|
||||
new SegmentedOutgoingEncryptionLayer(sink, Long.MAX_VALUE,
|
||||
tagCipher, segCipher, tagKey, segKey, false);
|
||||
Segment s = new SegmentImpl();
|
||||
System.arraycopy(plaintext, 0, s.getBuffer(), 0, plaintext.length);
|
||||
@@ -113,7 +113,7 @@ public class OutgoingSegmentedEncryptionLayerTest extends BriarTestCase {
|
||||
// Use the encryption layer to encrypt the plaintext
|
||||
SegmentSink sink = new ByteArraySegmentSink();
|
||||
OutgoingEncryptionLayer encrypter =
|
||||
new OutgoingSegmentedEncryptionLayer(sink, Long.MAX_VALUE,
|
||||
new SegmentedOutgoingEncryptionLayer(sink, Long.MAX_VALUE,
|
||||
tagCipher, segCipher, tagKey, segKey, true);
|
||||
Segment s = new SegmentImpl();
|
||||
System.arraycopy(plaintext, 0, s.getBuffer(), 0, plaintext.length);
|
||||
Reference in New Issue
Block a user