GBase 8a提供了aes_decrypt和aes_decrypt实现AES算法的加密和解密,只支持128位数据块模式,以及pkcs7的padding方法。
目录导航
样例
gbase> select hex(aes_encrypt('1234567890abcdefg','123456'));
+------------------------------------------------------------------+
| hex(aes_encrypt('1234567890abcdefg','123456')) |
+------------------------------------------------------------------+
| 5EA86DDB6B8227A2EB6313BF0BEAF599AD208E4D68F943AFE004559986CA8E23 |
+------------------------------------------------------------------+
1 row in set (Elapsed: 00:00:00.00)
gbase> select aes_decrypt(unhex('5EA86DDB6B8227A2EB6313BF0BEAF599AD208E4D68F943AFE004559986CA8E23'),'123456');
+-------------------------------------------------------------------------------------------------+
| aes_decrypt(unhex('5EA86DDB6B8227A2EB6313BF0BEAF599AD208E4D68F943AFE004559986CA8E23'),'123456') |
+-------------------------------------------------------------------------------------------------+
| 1234567890abcdefg |
+-------------------------------------------------------------------------------------------------+
1 row in set (Elapsed: 00:00:00.00)