public void RetrieveContent(
            IEnumerable <Uri> contentUris,
            Stream outputStream)
        {
            contentUris.EnsureNotNull(nameof(contentUris));
            outputStream.EnsureNotNull(nameof(outputStream));

            foreach (var contentUri in contentUris)
            {
                try
                {
                    var decrypted = AesGcmCrypto.Decrypt(
                        _uriRepository.RetrieveValue(contentUri),
                        _key.Value);

                    outputStream.Write(decrypted);
                }
                catch (CryptographicException e)
                {
                    throw new ChunkyardException(
                              $"Could not decrypt content: {contentUri}",
                              e);
                }
            }
        }
        public static void Encrypt_And_Decrypt_Return_Input()
        {
            var expectedText = "Hello!";
            var key          = AesGcmCrypto.PasswordToKey(
                "secret",
                AesGcmCrypto.GenerateSalt(),
                AesGcmCrypto.Iterations);

            var cipherText = AesGcmCrypto.Encrypt(
                AesGcmCrypto.GenerateNonce(),
                Encoding.UTF8.GetBytes(expectedText),
                key);

            var actualText = Encoding.UTF8.GetString(
                AesGcmCrypto.Decrypt(cipherText, key));

            Assert.Equal(expectedText, actualText);
        }