Esempio n. 1
0
        public async Task <(Stream, StoredItemMetadata)> RetrieveItem(string repo, string passphrase, string itemId)
        {
            var masterKey = await GetRepositoryMasterKey(repo, passphrase);

            var meta = await GetItemMetadata(repo, passphrase, itemId);

            var encryptedStream = await driver.ReadItem(repo, itemId);

            var dataStream = crypto.CreateDecryptionStream(encryptedStream, masterKey, Convert.FromBase64String(meta.Base64IV));

            return(dataStream, meta);
        }