One of our previous developers decided to obfuscate some columns via the mysql encode and
decode functions. This was done on a 4.x server. Recently, we converted to a 5.x server,
and some of the fields in the rows will not decode correctly, and I cannot figure out why.
My first thought was that perhaps the implementation of encode/decode changed, but
googling so far has been to no avail.
My second thought was that perhaps there was a problem when we dumped the data from the
4.x server and imported it to the 5.x server. The old 4.x server is gone, so I cannot
verify whether that is the case. I did dump/restore the data in question from the 5.x
back to a 4.x server, but it decodes in error as well.
This obfuscation was a retrofit to an existing table, mostly of varchar fields. Another
thought I had was that perhaps it's not a good idea to store binary data in a varchar
So, a few questions:
Anyone know if the implementation of endcode/decode changed along the line from v4 to v5?
What algorithm is used for encode/decode?
Are there limits on what can be stored in a varchar field? Is it ok to store the results
of encode/decode in a varchar?
We don't need to encrypt the data, simply obfuscate it to prevent accidental,
unintentional use. Any ideas appreciated.
|• encode/decode question||Rich Duzenbury||15 Aug|