I use the jsqlparser framework to intercept the SQL launched by the client program on a MySQL database.
I would like that for some fields (columns) during the insertion / update, I use AES_ENCRYPT on parameter (?) And the same, I use of AES_DECRYPT during the selection (SELECT).
Any idea for this using "ExpressionDeParser" or other function?
Example
Insertion :
insert into customer (id, name) values (?,?) => insert into customer (id, name) values (?, AES_ENCRYPT (?));
Selection: SELECT id, name from customer ;=> SELECT id, AES_DECRYPT (name) from customer;
Thanks,