The TO_BASE64() function encodes the argument "String" into its base-64 encoded form and returns the result with the current character set and collation of the connection.
The output consists of groups of four characters, with 3 data bytes being encoded in 4 characters.
If the last group is not complete, it will be padded to 4 characters with "="-characters.
To split long output, a line break is inserted after every 76 characters.
The decode recognizes and ignores newlines, carriage returns, tabs, and spaces.
Numeric values are interpreted as strings.
If the value of "String" is NULL, the TO_BASE64() function returns NULL.
The reverse function of TO_BASE64() is FROM_BASE64() for decoding base-64 strings. |