Decrypting select fields in a Class Library

Rencuz

New Member
there! I am working on an ASP.NET application that requires encryption of certain fields that I store in a database (that gives me a situation of storing both encrypt fields and normal fields in the same table and I have more tables like that like in any other project).Also, I have used a class library to have all the database fields be converted to classes and the attributes as objects. Now the problem is that, I have encrypted some selected fields with the help of the power of XML and \[code\]PropertyDescriptor\[/code\] over the \[code\]T entity\[/code\] field in the \[code\]Add(T entity)\[/code\] method of the Repository.The problem arises when I try to decrypt the data that is stored. I need to first find the type T (which is not available as a parameter like \[code\]entity\[/code\] in the encryption or add phase) and then search for those attributes that need to be decrypted (that, I do with the help of XML). The main problem for me now is that the \[code\]IList<>\[/code\]returned by \[code\]this._ObjectSet.ToList<>()\[/code\] (maybe wrong, I don't know) can't be associated with the \[code\]PropertyDescriptor\[/code\] of the type of the table I'm querying. I understood that the type of the table is same as that of the \[code\]IList<>\[/code\] but that's the distance I have reached so far.I have tried something, but in vain, to try and decrypt and have complicated and confused myself a lot. Some help will be considered grateful. And if you get to read this upto here, Thanks for the immense patience you have shown towards me :)
 
Back
Top