通过c#加密SQL数据库中的数据 [英] encrypt data in SQL database by c#
本文介绍了通过c#加密SQL数据库中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过c#加密SQL数据库中的列并使用类似'%%'而不是相等来搜索它们?
例如我有一个列' c1'名称和列数据已加密。现在我如何使用这个查询?
查询:
从[table]中选择*,其中[c1]喜欢'%any thing%'
How encrypt a column in SQL database by c# and search them by using like'%%' instead of equal?
For example I have a column by'c1' name and column data are encrypted. Now how I can use this query?
Query:
Select * from [ table ] where [c1] like '%any thing%'
推荐答案
U必须先在sql中定义encrypt()和decrypt()函数,并在搜索任何内容时使用decrypt()函数来匹配你的单词。
U Have to first define encrypt() and decrypt() functions in sql and while searching any thing you should use decrypt() function to match your word.
这篇关于通过c#加密SQL数据库中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文