mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Add unit tests for KeyManagerImpl and create TransportKeyManager
interface and a factory for that.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package org.briarproject.api.transport;
|
||||
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
import org.briarproject.api.crypto.SecretKey;
|
||||
import org.briarproject.api.db.DbException;
|
||||
import org.briarproject.api.db.Transaction;
|
||||
|
||||
public interface TransportKeyManager {
|
||||
|
||||
void start(Transaction txn) throws DbException;
|
||||
|
||||
void addContact(Transaction txn, ContactId c, SecretKey master,
|
||||
long timestamp, boolean alice) throws DbException;
|
||||
|
||||
void removeContact(ContactId c);
|
||||
|
||||
StreamContext getStreamContext(Transaction txn, ContactId c)
|
||||
throws DbException;
|
||||
|
||||
StreamContext getStreamContext(Transaction txn, byte[] tag)
|
||||
throws DbException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.briarproject.api.transport;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
|
||||
public interface TransportKeyManagerFactory {
|
||||
|
||||
TransportKeyManager createTransportKeyManager(TransportId transportId,
|
||||
long maxLatency);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user