C# encrypt and decrypt generic List<T>
<p>I have been using an answer I found to encrypt and decrypt strings</p>

<pre><code> public class Crypto 

 public static string EncryptStringAES(string plainText, string sharedSecret)
</code></pre>

<p><a href="https://stackoverflow.com/questions/202011/encrypt-and-decrypt-a-string">Encrypt and decrypt a string</a></p>

<p>However, now I wish to encrypt and decrypt generic List </p>

<p>Example:</p>

<pre><code>var fileName = @"C:\temp\troublecall.txt";
FileStream s = new FileStream(fileName, FileMode.Create);
List&lt;TroubleCall&gt; tcs = new List&lt;TroubleCall&gt;();

foreach (var tc in troubleCalls)
{
    tcs.Add(tc);
}

BinaryFormatter f = new BinaryFormatter();

f.Serialize(s, tcs);
s.Close();
</code></pre>

<p>So I cannot use the existing method in that crypto class to encrypt a generic list</p>

<p>So It seems that I could try to encrypt in the loop somehow, right?  Is is possible to just encrypt the entire finished List as an object ?</p>