How do you encode ? And for what reason/purpose ?
I've changed to AES_ENCRYPT. Basically what I'm storing is client information abount their internal LAN. They are directed to a secure site and fill out a form. Initially I was just emailing the form (via PHP) to our installation team at the office, but realizing this isn't secure, it defeated the purpose of having them visit a secure site in the first place.
Now where I'm going with things is to have their form fields encrypted upon insertion to the DB and only send a notification email about an entry made to the DB w/o any sensitive information in the body. Since we know how/where to go to get the info, we'll browse there manually and have the output form decrypt the fields for viewing. That way nothing is plain text.
It seems like in VARCHAR is see the encrypted characters, but in BLOB I only see BLOB 'xx' bytes. So is one more secure?
If you're using something like base64_encode() / base64_decode() it will not really matter.
Not sure where this comes in. Heres an example of what my insert query looks like:
VALUES ('$accountname',
AES_ENCRYPT('$siteaddress','$crypt0'),
AES_ENCRYPT('$citystatezip','$crypt6')
The key is in an include file in another password protected directory. The kicker is the data needs only be in the DB for a day or so. Even so, thats long enough to be compromised. Our output form which decrypts the data has a link at the botton which deletes the entry from the DB.
Make any sense?