base64.encode

Syntax base64.encode (data, linelength)

Params data is the data to be encoded; it can be of any type

linelength is the number of characters to wrap the output data at; a linelength of 0 does not wrap the output

Action Encodes the data with the base64 algorithm, which makes it safe for transport through email and other 7-bit connections.

Returns A string containing the encoded data

Examples base64.encode ("mypassword", 0)
"bXlwYXNzd29yZA=="

Notes This verb implements the base64 encoding as defined in RFC 1521.

base64 encoding is used for MIME email, HTTP basic authentication, Frontier's Fat Page file format and to encode binary objects in XML-RPC and SOAP.

See Also base64.decode

Discuss