Renamed a couple of classes.

This commit is contained in:
akwizgran
2012-01-20 23:28:17 +00:00
parent 3a77ba9aaf
commit 48ceaaea2a
10 changed files with 29 additions and 24 deletions

View File

@@ -59,9 +59,9 @@
<test name='net.sf.briar.transport.FrameWindowImplTest'/>
<test name='net.sf.briar.transport.IncomingEncryptionLayerImplTest'/>
<test name='net.sf.briar.transport.IncomingErrorCorrectionLayerImplTest'/>
<test name='net.sf.briar.transport.IncomingSegmentedEncryptionLayerTest'/>
<test name='net.sf.briar.transport.OutgoingEncryptionLayerImplTest'/>
<test name='net.sf.briar.transport.OutgoingSegmentedEncryptionLayerTest'/>
<test name='net.sf.briar.transport.SegmentedIncomingEncryptionLayerTest'/>
<test name='net.sf.briar.transport.SegmentedOutgoingEncryptionLayerTest'/>
<test name='net.sf.briar.transport.XorErasureCodeTest'/>
<test name='net.sf.briar.transport.XorErasureDecoderTest'/>
<test name='net.sf.briar.transport.XorErasureEncoderTest'/>

View File

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

View File

@@ -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();

View File

@@ -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();

View File

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