mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Encrypter and decrypter for segmented transports (untested).
This commit is contained in:
@@ -15,6 +15,7 @@ import javax.crypto.Mac;
|
||||
import net.sf.briar.BriarTestCase;
|
||||
import net.sf.briar.api.crypto.CryptoComponent;
|
||||
import net.sf.briar.api.crypto.ErasableKey;
|
||||
import net.sf.briar.api.plugins.FrameSource;
|
||||
import net.sf.briar.api.transport.ConnectionReader;
|
||||
import net.sf.briar.api.transport.ConnectionWriter;
|
||||
import net.sf.briar.crypto.CryptoModule;
|
||||
@@ -89,8 +90,8 @@ public class FrameReadWriteTest extends BriarTestCase {
|
||||
assertArrayEquals(tag, recoveredTag);
|
||||
assertTrue(TagEncoder.validateTag(tag, 0, tagCipher, tagKey));
|
||||
// Read the frames back
|
||||
ConnectionDecrypter decrypter = new ConnectionDecrypterImpl(in,
|
||||
frameCipher, frameKey, mac.getMacLength());
|
||||
FrameSource decrypter = new ConnectionDecrypter(in, frameCipher,
|
||||
frameKey, mac.getMacLength());
|
||||
ConnectionReader reader = new ConnectionReaderImpl(decrypter, mac,
|
||||
macKey);
|
||||
InputStream in1 = reader.getInputStream();
|
||||
|
||||
Reference in New Issue
Block a user