开发者

Encrypt In .NET / Decrypt in SQL Server

开发者 https://www.devze.com 2023-01-22 02:55 出处:网络
Is there a way to decrypt a column when querying da开发者_如何学Cta from a SQL Server (2005/2008) database that has been encrypted using DES via .NET? If so, how? I have the key, but don\'t know how t

Is there a way to decrypt a column when querying da开发者_如何学Cta from a SQL Server (2005/2008) database that has been encrypted using DES via .NET? If so, how? I have the key, but don't know how to use it within the context of a sql server query.


I would probably consider creating a CLR function in SQL Server to handle this decryption.

You can use this function just like any other UDF within SQL Server to decrypt on demand.

That way, its as simple as using regular .NET C# code to handle it exactly the way you would do it in your application itself.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号