Returns a codified string in base64.
 

1 byte.base64.encode

<byte.base64.encode>
    <data /> !
</byte.base64.encode>

Exceptions

requires 1 values, received [...]

It has been specified an incorrect number of values.

Example

Print a codified string in BASE64.

Copy
<xsql-script name='test_byte_base64_encode'>
    <body>
        <set name='m_data'>Hello world.</set>
        <set name='m_encode'>
            <byte.base64.encode>
                <m_data />
            </byte.base64.encode>
        </set>
        <println><m_encode /></println>

        <set name='m_decode'>
            <byte.base64.decode>
                <m_encode />
            </byte.base64.decode>
        </set>
        <println><m_decode /></println>
    </body>
</xsql-script>

The result is:

Copy
SGVsbG8gd29ybGQu
Hello world.