Add methods for adding unbound keys.

This commit is contained in:
akwizgran
2018-03-27 15:47:01 +01:00
parent 78f2d48bc4
commit bb2f94d5eb
7 changed files with 104 additions and 10 deletions

View File

@@ -16,13 +16,21 @@ public interface KeyManager {
/**
* Informs the key manager that a new contact has been added. Derives and
* stores transport keys for communicating with the contact.
* stores a set of transport keys for communicating with the contact over
* each transport.
* <p/>
* {@link StreamContext StreamContexts} for the contact can be created
* after this method has returned.
*/
void addContact(Transaction txn, ContactId c, SecretKey master,
long timestamp, boolean alice) throws DbException;
/**
* Derives and stores a set of unbound transport keys for each transport.
*/
void addUnboundKeys(Transaction txn, SecretKey master, long timestamp,
boolean alice) throws DbException;
/**
* Returns a {@link StreamContext} for sending a stream to the given
* contact over the given transport, or null if an error occurs or the