SQL Server 2008 R2 Encryption - with Entity Framework

I am looking to use database encryption in a database that I connect to in my application through. Entity Framework.

Is there an easy way / best practice to be able to receive unencrypted data and write encrypted data back to the database. I don’t really want to edit edmx xml manually, but I'm struggling to find some resources that will tell me how to achieve this.

I plan to use the Symmetric Key and the DES triple encryption algorithm.

+5
source share
2 answers

SQL Server 2008 R2 - , .

:

  • - SQL Server - SQL Server. , EF.
  • - SQL Server - varbinary. , , EF. , EDMX SQL SSDL.
  • , - ObjectMaterialized SavingChanges . , , ( base64).
+5

, .

:

CREATE VIEW [your_view_name] as
SELECT 
CONVERT(varchar(200),DECRYPTBYPASSPHRASE('[your_symmetric_key]', [encrypted_field])) As [encrypted_field],
FROM [your_table_name]

EF.

, , .

0

All Articles