I have a class with a bunch of fields that need to be encrypted before being saved, something like this;
class MyClass
{
public string CustomerName{ get; set; }
public string Address1{ get; set; }
public string Address2{ get; set; }
public string Town{ get; set; }
public string Postcode{ get; set; }
// updated
public DateTime RegistrationDate { get; set; } // don't encrypt
}
What's the most performant approach to encrypt the fields in this object? What about if we had to encrypt 100 or 1000 of these objects? (can we leverage TPL?)
UPDATE:
Some of the fields might not need encryption, so I don't want to encrypt the entire class.
.NET4 is acceptable.