Integración CLR de SQL Server para lograr el cifrado / descifrado

I have a requirement to store the data in encrypted form in database tables. I want to do it at the database level but here are the problems I am facing:

  1. Data Type of the field should be Varbinary.
  2. Encryption is not supported by Workgroup edition
  3. Is it possible to encrypt Numeric Fields?

I want to access the encrypted data in tables to fetch in views and stored procedure for some processing but due to above problems I am not able to.

Here is my Environment:

Plataforma de desarrollo - ASP.Net,.Net Framework 3.5,Visual studio 2008

Sistema operativo del servidor - Servidor de Windows 2008

base de datos - SQL Server 2008 Work group edition

I was also thinking to adopt a different approach to resolve this issue (yet to test it's feasibility). I was just wondering if I could create a CLR function (which could take parameters to encrypt and decrypt data using Cryptography types provided in .Net framework) and use the CLR integration feature of SQL Server and call that function from stored procedure and views.

I am not sure if I am thinking in right direction? Any advice on this as well please.

preguntado el 09 de enero de 11 a las 07:01

1 Respuestas

Yes, you can do that. However, your SQL CLR assembly may need to be marked as unsafe for the crypto classes to work, depending on what cryptoapi methods you use.

Respondido 13 Jul 18, 09:07

Thanks KristoferA, on a side note, Can you also let me know if is it possible to use built-in SQL encryption in workgroup edition? Is it possible to encrypt the Numeric fields? as per my understanding the field data type should be varbinary? - Aakash

De acuerdo a esta página: , SQL 2008 Workgroup edition should support SQL Server's built in data encryption. - KristoferA

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.