What we do is generate a random alpha-numeric string N characters long (the
longer the better, IMO), and store that in a separate key database on the
same server.
Then, we use an MD5 hash of that random string as key_string to both
encrypt and decrypt using AES_*. That way, the actual key_string never
exists anywhere except in memory, so even if the code gets hacked, it is
extremely strong security, because you would need to hack the code, and the
separate database, as well as the database containing the cc info.
All fields used are varchar.
--Scott Brown