[eluser]Unknown[/eluser]
Hello,
I want to crypt some columns in my mysql database. Is there a mysql "wrap"-solution, where i can define the columns and a key for the crypt/decrypt and the solution changes the SQL with the cryption functions.
e.g.
I have:
Code:
select col1, col2, col3 from table1 where col2 like '%one%';
I want crypt the columns col2 and col3. the query must changed automatically to:
Code:
select col1, AES_DECRYPT(col2, 'mykey') as col2, AES_DECRYPT(col3, 'mykey') as col3 where AES_DECRYPT(col2, 'mykey') like '%one%';
Same for Insert, Delete, Update ...
If I make it with active records, I must define all queries separatly...
Is there a mysql-parser and compiler, where can i tokenize and recompile the sql-query with the AES Crypting?
Is there an another solution?