Syntax
DES_DECRYPT(crypt_str[,key_str])
Purpose
DES_DECRYPT() decrypts the string encrypted by using the DES_ENCRYPT() function. If an error occurs, this function returns NULL. This function is available only when OceanBase Database supports SSL.
The key_str argument specifies the key for decrypting the message. If you do not specify the key_str argument, this function checks the first byte of the encrypted string to determine the ID of the DES key used to encrypt the original string, and then reads the key from the DES key file to decrypt the string. Therefore, you must have the SUPER privilege.
If the crypt_str string is plaintext, it is directly returned.
Examples
obclient> SELECT DES_DECRYPT(DES_ENCRYPT('secret','cry'), 'cry');
+-------------------------------------------------+
| DES_DECRYPT(DES_ENCRYPT('secret','cry'), 'cry') |
+-------------------------------------------------+
| secret |
+-------------------------------------------------+
1 row in set