private void CanDecryptEncryptedData(IEncryptionProvider provider)
        {
            var sampleData = Enumerable.Range(0, 100).Select(x => (byte)x).ToArray();

            byte[] encryptedData;
            byte[] decryptedData;

            using (var encryptedStream = new MemoryStream())
                using (var sourceStream = new MemoryStream(sampleData))
                {
                    provider.EncryptData(encryptedStream, sourceStream, "peer");

                    encryptedStream.Flush();
                    encryptedData = encryptedStream.ToArray();
                }

            using (var encryptedStream = new MemoryStream(encryptedData))
                using (var decryptedStream = new MemoryStream())
                {
                    provider.DecryptData(encryptedStream, decryptedStream, "peer");

                    decryptedStream.Flush();
                    decryptedData = decryptedStream.ToArray();
                }

            Assert.IsTrue(sampleData.SequenceEqual(decryptedData), "Decrypted data is differs from original");
        }