is it possible to implement SQL AES_ENCRYPT/AES_DECRYPT into SQLite using PHP ?
For example I have a PHP Code:
$SQL = "INSERT INTO parent (Request, Column1, Column2) VALUES ('$Request',AES_ENCRYPT('$Col1','$key'),AES_ENCRYPT('$Col2','$key'))";
and this query works in SQL, but is it possible to use this same query in SQLite?
I’d say you have 2 options :
encrypt your values at the PHP level and store them as BLOBs or base64 strings
encrypt the whole database executing the following command (just like any other regular SQL command) : PRAGMA hexkey=’0x_your_key_in_hex_format’ . Don’t forget do do the same when you open your database for running SELECT queries. Here is the official documentation.