コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }