Updated on 2025-06-30 GMT+08:00

Encryption Functions

Table 1 Encryption functions

MySQL

GaussDB

Difference

AES_DECRYPT()

Supported, with differences

  • GaussDB does not support ECB mode, which is an insecure encryption mode, but uses CBC mode by default.
  • When characters are specified to be encoded in SQL_ASCII for GaussDB, the server parses byte values 0 to 127 according to the ASCII standard, and byte values 128 to 255 cannot be parsed. If the input and output of the function contain any non-ASCII characters, the database cannot convert or verify them.
  • The return value type in MySQL is BINARY, VARBINARY, BLOB, MEDIUMBLOB, or LONGBLOB, while the return value type in GaussDB is fixed to LONGBLOB.

AES_ENCRYPT()

Supported, with differences

SHA()/SHA1()

Supported.

-

SHA2()

Supported.

-