I have some encrypted data in a MySQL table. AES algorithm in CBC mode with key and iv are used for encryption. I want to read this data using MySQL AES_Decrypt
function. For example, this is a sample of my code:
select AES_DECRYPT("eqVjuHlcVnP4QwN6VB9QFg==", "qwertyuiopasdfghjklzxcvbnmQWERTY", "QWERTYUIOPASDFGH") as item;
But it return this error:
#1582 – Incorrect parameter count in the call to native function ‘AES_DECRYPT’
According to https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_aes-decrypt we can use AES_Decrypt
function with 3 parameters. How can I handle this problem?