mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
PacketWriter is implemented by two classes: PacketWriterImpl and
PacketEncrypter. The separation allows authentication and encryption to be tested separately.
This commit is contained in:
@@ -4,6 +4,7 @@ import java.security.KeyPair;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.Signature;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.SecretKey;
|
||||
|
||||
@@ -19,5 +20,9 @@ public interface CryptoComponent {
|
||||
|
||||
MessageDigest getMessageDigest();
|
||||
|
||||
Cipher getPacketCipher();
|
||||
|
||||
Signature getSignature();
|
||||
|
||||
Cipher getTagCipher();
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* A filter that adds tags and MACs to outgoing packets. Encryption is handled
|
||||
* by the underlying output stream.
|
||||
* A filter that adds tags and MACs to outgoing packets, encrypts them and
|
||||
* writes them to the underlying output stream.
|
||||
*/
|
||||
public interface PacketWriter {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user