I want to encrypt text using AES in mysql, but I have a small problem, because you need to use varbinary to store these.
Some of my datatypes are varchar and yes I can probably work out the length of my varbinary for these. However for my address fields I use the TEXT datatype, as we have Chinese addresses stored and these can be very long. I use the TEXT datatype because you do not need to specify a length in mysql.
The problem is that with varbinary you need to specify a length, and I don't really know the length because the addresses can be of any length.
Is there some kind of binary datatype I can use for AES where I don't have to specify the length of the data?