DES_ENCRYPT(str[,{key_num|key_str}]) encrypts the string with the given key using the Triple-DES algorithm. : DES_ENCRYPT « Encryption Compression Functions « MySQL Tutorial






The encryption key to use is chosen based on the second argument to DES_ENCRYPT(), if one was given:

ArgumentDescription
No argumentThe first key from the DES key file is used.
key_numThe given key number (0-9) from the DES key file is used.
key_strThe given key string is used to encrypt str.


mysql>
mysql>
mysql> SELECT DES_ENCRYPT('text');
+---------------------+
| DES_ENCRYPT('text') |
+---------------------+
| ~?          |
+---------------------+
1 row in set (0.00 sec)

mysql>
mysql>








19.8.DES_ENCRYPT
19.8.1.DES_ENCRYPT(str[,{key_num|key_str}]) encrypts the string with the given key using the Triple-DES algorithm.