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:
- Data Type of the field should be Varbinary.
- Encryption is not supported by Workgroup edition
- 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
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.