Is that possible to use where condition in sql after converting data in to encrypted?
-
Have you tried anything?Joël Salamin– Joël Salamin2015-03-02 10:43:10 +00:00Commented Mar 2, 2015 at 10:43
-
What kind of encryption are you talking about? Data-at-rest encryption of the database files? That should be transparent to data users.Thilo– Thilo2015-03-02 10:45:10 +00:00Commented Mar 2, 2015 at 10:45
-
possible duplicate of SQL Encrypted Columns in WHERE ClauseThilo– Thilo2015-03-02 10:56:17 +00:00Commented Mar 2, 2015 at 10:56
Add a comment
|
1 Answer
Not if there is any kind of salt (such as an IV) involved in the encryption. In that case, every time you encrypt the same plaintext you will get a different ciphertext, so that you cannot search for it anymore.
It appears that this is the case with SQL Server's EncryptByKey facility.
2 Comments
bala
Encryption is done in sql itself. i insert the data using following query INSERT INTO dbo.Customer(UserId , FirstName, LastName, dbpassword) VALUES (EncryptByKey(Key_GUID('Key4CellEncryption'),'3'),EncryptByKey(Key_GUID('Key4CellEncryption'),'bala'),EncryptByKey(Key_GUID('Key4CellEncryption'),'malaichamy'),EncryptByKey(Key_GUID('Key4CellEncryption'),'bala'))
bala
Encryption is done by using following example. databasejournal.com/features/mssql/…