Add key manager method for contacts with handshake keys.

This commit is contained in:
akwizgran
2019-05-09 12:10:07 +01:00
parent 84e2402404
commit f42fc5213e
6 changed files with 118 additions and 14 deletions

View File

@@ -18,19 +18,32 @@ public interface KeyManager {
/**
* Informs the key manager that a new contact has been added. Derives and
* stores a set of transport keys for communicating with the contact over
* each transport and returns the key set IDs.
* stores a set of rotation mode transport keys for communicating with the
* contact over each transport and returns the key set IDs.
* <p/>
* {@link StreamContext StreamContexts} for the contact can be created
* after this method has returned.
*
* @param alice true if the local party is Alice
* @param active whether the derived keys can be used for outgoing streams
* @param alice True if the local party is Alice
* @param active Whether the derived keys can be used for outgoing streams
*/
Map<TransportId, KeySetId> addContact(Transaction txn, ContactId c,
SecretKey rootKey, long timestamp, boolean alice, boolean active)
throws DbException;
/**
* Informs the key manager that a new contact has been added. Derives and
* stores a set of handshake mode transport keys for communicating with the
* contact over each transport and returns the key set IDs.
* <p/>
* {@link StreamContext StreamContexts} for the contact can be created
* after this method has returned.
*
* @param alice True if the local party is ALice
*/
Map<TransportId, KeySetId> addContact(Transaction txn, ContactId c,
SecretKey rootKey, boolean alice) throws DbException;
/**
* Marks the given transport keys as usable for outgoing streams.
*/