简体   繁体   English

使用带有 EF Core 的 PostgreSql 在加密列中搜索

[英]Searching in encrypted columns using PostgreSql with EF Core

I have a table with some encrypted columns and I want to search those columns using LIKE / ILIKE operators.我有一个包含一些加密列的表,我想使用LIKE / ILIKE运算符搜索这些列。 However, I have achieved exact searching but I'm unable to do pattern matching.但是,我已经实现了精确搜索,但无法进行模式匹配。

NOTE: I am using server side encryption/decryption using value converters.注意:我正在使用使用值转换器的服务器端加密/解密。

I am open for any solution as I have to implement this in anyway.我对任何解决方案持开放态度,因为无论如何我都必须实现这一点。

Thanks谢谢

This is fundamentally impossible.这基本上是不可能的。 If the database does not contain clear text data, you cannot perform anything else but an equality search inside the database.如果数据库不包含明文数据,则只能在数据库中执行相等搜索。 You will have to perform pattern matching inside the application where you have the clear text values.您必须在具有明文值的应用程序内执行模式匹配。 Such is the price of security.这就是安全的代价。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM