AES_DECRYPT
Decrypt data using AES. This function decrypts a string that was encrypted using the Advanced Encryption Standard (AES) algorithm.
Syntax
AES_ENCRYPT(crypt_str, key_str, [, iv [, mode]])AES_DECRYPT(crypt_str,key_str)Description
SELECT HEX(AES_ENCRYPT('foo', 'bar', '0123456789abcdef', 'aes-128-ctr')) AS x;
+--------+
| x |
+--------+
| C57C4B |
+--------+
SELECT AES_DECRYPT(x'C57C4B', 'bar', '0123456789abcdef', 'aes-128-ctr');
+------------------------------------------------------------------+
| AES_DECRYPT(x'C57C4B', 'bar', '0123456789abcdef', 'aes-128-ctr') |
+------------------------------------------------------------------+
| foo |
+------------------------------------------------------------------+Last updated
Was this helpful?

