I have been using an answer I found to encrypt and decrypt strings
public class Crypto
public static string EncryptStringAES(string plainText, string sharedSecret)
However, now I wish to encrypt and decrypt generic List
Example:
var fileName = @"C:\temp\troublecall.txt";
FileStream s = new FileStream(fileName, FileMode.Create);
List<TroubleCall> tcs = new List<TroubleCall>();
foreach (var tc in troubleCalls)
{
tcs.Add(tc);
}
BinaryFormatter f = new BinaryFormatter();
f.Serialize(s, tcs);
s.Close();
So I cannot use the existing method in that crypto class to encrypt a generic list
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 ?