we are using data sets as our data access layer. currently there are some columns that store encrypted data.
using CLR i was able to create an SQL function for decryption of the data in a select but in discussion we have determined that to be a security risk.
what i am looking to do is to either
You may try to create an extension methods for this task:
namespace ExtensionMethods
{
public static class MyExtensions
{
public static void SetEncryptColumn(this DataSetType.DataTableRow row, string value)
{
row.Encrypt = EncryptValue(value);
}
public static string GetEncryptColumn(this DataSetType.DataTableRow row)
{
return DecryptValue(row.Encrypt);
}
}
}
http://msdn.microsoft.com/en-us/library/bb383977%28v=vs.90%29.aspx