问题
I have a MySQL issue.
I want to decrypt a blob with AES_DECRYPT and try it in phpMyAdmin with a query
SELECT key_value ,AES_DECRYPT(key_value,'crypt_key')FROM `ps_keymanager` WHERE `id_keymanager`=1497
the query works, but it returned me NULL and not the decrypted value :(
回答1:
Try casting
SELECT key_value , CAST (AES_DECRYPT(key_value,'crypt_key')AS CHAR(50))
FROM `ps_keymanager` WHERE `id_keymanager`=1497
来源:https://stackoverflow.com/questions/36022928/mysql-aes-decrypt-returns-null