The ENCODE() function encrypts "String" with "Password".
The result is a binary string with the same length as "String".
The strength of the encryption depends on the quality of the random number generator.
Numeric values in the "String" and "Password" arguments are interpreted as a character string.
If "String" contains no characters, an empty string is returned.
If the value of the "String" or "Password" argument is NULL, the ENCODE() function returns NULL.
To decode the result, the DECODE() function can be chosen.
This feature is not present in MySQL 8.0. |