Skip to main content

Name

msys.base64.encode — Base64-encode a string

Synopsis

msys.base64.encode(original, fold, charset);

original: mixed
fold: string, optional
charset: string, optional

Description

original can be a string or a msys.core:_ec_string. This function returns a base64 encoded string. If fold is true, the encoded string is folded at every 76 bytes by inserting a CRLF after that position. By default, the character encoding for all text is UTF-8. If you would like to convert the text to a different character encoding before it is base64 encoded, then specify that as charset.

Enable this function with the statement require('msys.base64');.

See Also

Was this page helpful?