I have a database with maybe 60 fields in it. Only 3 of the fields need to be encypted in my database (MySQL), one of which is the users Social Security Number.
I have read that if you want to use AES_ENCRYPT, then the field must be binary. I have done this, and the insert statement reads as follows:
Code: Select all
INSERT INTO $usertable values( //...about 25 fields here, AES_ENCRYPT('$SSN', 'text_key'), //... about 30 fields here);Code: Select all
SELECT AES_DECRYPT( SSNbr, 'text_key' ) AS decrypted FROM $usertable.Code: Select all
"SELECT * FROM $table";Thanks