How to integrate AES_ENCRYPT & AES_DECRYPT?
How to integrate AES_ENCRYPT & AES_DECRYPT?
I have some fields which need to contain encrypted data. Is there any way to wrap specific fields in an AES_ENCRYPT function on submission? In addition, a CAST(AES_DECRYPT() AS CHAR) is required in order to return the string value from those VARBINARY fields on SELECT.
Regards,
-John
Regards,
-John
This discussion has been closed.
Replies
If you are using the Editor PHP classes, you could use get and set formatters to do this. There aren't any built in functions for this kind of encryption handling, but its simple to use a closure to do it. The documentation for the Field class functions, including the get and set formatters is available here: http://editor.datatables.net/docs/current/php/class-DataTables.Editor.Field.html#_getFormatter .
Note that these are executed in PHP-world. There is currently no method in the Editor PHP libraries to use SQL functions.
Regards,
Allan