Aes_decrypt Can Not Decrypt Column
(Doc ID 2733826.1)
Last updated on MARCH 01, 2021
Applies to:
MySQL Server - Version 8.0 and laterInformation in this document applies to any platform.
Symptoms
When trying to decrypt data from encrypted table, result is displayed in HEX.
######################################
Test case
create table t11 (h1 varchar(300))
insert into t11 values (hex(aes_encrypt('helorld','robert')));
Query OK, 1 row affected (0.02 sec)
localhost@mysql.sock][rob][:12: ]> select * from t11;
+----------------------------------+
| h1 |
+----------------------------------+
| 150C38A19F36D45356B5EE8FF47F354E |
+----------------------------------+
1 row in set (0.00 sec)
select aes_decrypt(UNHEX('150C38A19F36D45356B5EE8FF47F354E'),'robert') from t11;
+----------------------------------------------------------------------------------------------------------------------------------+
| aes_decrypt(UNHEX('150C38A19F36D45356B5EE8FF47F354E'),'robert') |
+----------------------------------------------------------------------------------------------------------------------------------+
| 0x68656C6F726C64 |
+----------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |