Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI Friends,

I have been facing one issue that is,I want to decript the values of sql server in MVC 3.0,
for that i have made some code which is given below.

DbContext.ExecuteStoreCommand("OPEN SYMMETRIC KEY test DECRYPTION BY CERTIFICATE testCert");

and my date retrival logic is some thing like below

                      var patDataNS = from n in DbContext.trn_testEMP
                          select new                                                                           {                                                                                                                                       hdMName = n.other_name,-------------Encrpted value
                                        hdLName = n.last_name,--------------Encrpted value
                                     };

DbContext.ExecuteStoreCommand("close symmetric key RxEncrKey");


I want to decript the values of Other_name and last_name in code
Please help me to resolved this issue.

Thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900