Open uppercuut opened 4 months ago
if you wish to decrypt data already encrypted in the DB, you can try the approach suggested here. I have no idea if it would work though.
However, if you need EFCore to do the decryption on the DB level, that won't happen as the encryption/decryption with this library works as a value converter and is done at the EFCore layer, not the DB one. What this means is that filtering on an encrypted column using EFCore will always pull the data to the client side before decrypting and then filtering.
this a huge limitation, which need to taken with a different approach ,
Say I have a complex query that needs to be used where inside of the SQL this wont work by the current state.
@uppercuut to achieve what you want (decrypting on the database level) is possible albeit with some extra work on your end. You need to write a user-defined function that handles the decryption on the db level.
You can read more about it here
Good question