Generate handshake keys on demand, store when DB is opened.

This commit is contained in:
akwizgran
2019-04-26 17:49:07 +01:00
parent 891c82b2e5
commit faba9a6b70
3 changed files with 106 additions and 43 deletions

View File

@@ -38,7 +38,18 @@ public interface IdentityManager {
/**
* Returns the cached local identity or loads it from the database.
* <p/>
* Read-only.
*/
LocalAuthor getLocalAuthor(Transaction txn) throws DbException;
/**
* Returns the cached handshake keys or loads them from the database.
* <p/>
* Read-only.
*
* @return A two-element array containing the public key in the first
* element and the private key in the second
*/
byte[][] getHandshakeKeys(Transaction txn) throws DbException;
}