问题
I have tested to use AES_DECRYPT on a .asp page and it only showed ???? instead of the descypted value in clear text, when I used this select query.
select *,AES_DECRYPT(thepassword,'myencyptkey2018' ) AS passw from personal
But if I use this with convert using utf8 then it displays the text value.
select *,CONVERT(AES_DECRYPT(thepassword,'myencyptkey2018' ) USING utf8) AS passw from personal
My mySql databas is set to use charset utf8, my .asp uses charset utf8, the connection string as well, as far as I know I'm using utf8 everywhere. So my question is, why do I need to use convert using utf8? Why isn´t the first select code above work? Where in my settings is it not using utf8? If anywhere? Thanks.
This is the variables that you might want to see?
来源:https://stackoverflow.com/questions/60589167/why-do-i-need-to-use-convert-using-utf8-with-aes-decrypt-in-select-string