Hello everyone,
I am trying to store a string into MySQL Database in encrypted format using the AES_Encrypt/AES_DECRYPT Function, that is available for MySQL version 4.0.2 and higher ( I use 4.1.x, so the version is fine). Here is my SQL Strings:
For Insert Into Database:
Where 'motb6q4x79yoefbj' is an encryption key generated by random using a random string generating function.
Query to retrieve and Decrypt the string:
As far as the MySQL Table that is being used, its a single column table with Data Type VARCHAR and length of 100 characters (for testing purposes only).
The INSERT SQL statement executes fine. However, the Query to retrieve and Decrypt the string generates the following error:
Does anyone see anything wrong with the SQL Syntax being used here?