I found some code on AES encryption that works brilliantly, I modified it enough to make it just that much faster to use.
The only thing that I am wondering about, I have a table that needs a couple of fields encrypted, in my previous application which was web forms, i encrypted and decrypted on the form itself.
With my new application I switched to MVC, and I find working in it just that much faster, now what I want to know where is the best places to use my Enc.Encrypt function? On every page where the data gets passed? Decrypt it on every page I want to view it? Would it not be better to encrypt it in the model itself?
For instance take the { get; set; }, is it possible to run my algorithm on it before I save, and decrypt automatically in the model when I run?
This should also make my maintenance easier and if we are a larger team also that more secure.