Declaration
ENCODE(str,pass_str)
Description
The ENCODE() function uses pass_str as a password to encrypt the string. The result is a binary string of the same length as str. To decrypt this result, use DECODE().
Examples
When using ENCODE(), you must use a salt value to reduce the risk.
obclient> SELECT ENCODE('text', CONCAT('ob_random_salt','ob_secret_password'))
+---------------------------------------------------------------+
| ENCODE('text', CONCAT('ob_random_salt','ob_secret_password')) |
+---------------------------------------------------------------+
5+ |
+---------------------------------------------------------------+
1 row in set