Syntax
ENCRYPT(str[,salt])
Purpose
ENCRYPT() uses the Unix crypt() call to encrypt str and return a binary string. The salt parameter must be a string of at least two characters; otherwise, the result is NULL. If you do not specify the salt parameter, a random value is used.
Because system calls require a null-terminated string, we do not recommend that you use ENCRYPT() with the ucs2, utf16, utf16le, or utf32 multibyte character sets.
If the system does not support crypt(), ENCRYPT() always returns NULL.
Examples
obclient> SELECT ENCRYPT('hello');
+------------------+
| ENCRYPT('hello') |
+------------------+
| XROflfjMAx1GA |
+------------------+
1 row in set
