public async Task <PrivateKeyBook> RefreshBook(PrivateKeyBook book) { var result = new PrivateKeyBook(); result.Book.Add(new PrivateKeyBook.PrivateKeyBookRecord() { Purpose = KeyPurpose.MASTER_KEY, PrivateKey = book.GetMaster() }); await GenerateSendReceiveKeys(result); return(result); }
public async Task <PrivateKeyBook> RefreshEphemeralBook(PrivateKeyBook book) { var result = new PrivateKeyBook(); result.Book.Add(new PrivateKeyBook.PrivateKeyBookRecord() { Purpose = KeyPurpose.MASTER_KEY, PrivateKey = book.GetMaster() }); result.Book.Add(new PrivateKeyBook.PrivateKeyBookRecord() { Purpose = KeyPurpose.DH_RECEIVE, PrivateKey = await Generate() }); return(result); }