base64 library
Summary
Functions
decode(str)shared
Decodes a Base64 string with
util.Base64Decode.encode(str)shared
Encodes a value as Base64.
Functions
On the server
Decodes a Base64 string with util.Base64Decode.
Parameters
- str String Base64 encoded string
Returns
- String The decoded data, or
nilif the string is not valid Base64
See also
On the client
Decodes base64 text with util.Base64Decode.
Parameters
- data String The base64 text
Returns
- String The decoded data, or
nilwhen the text is not valid base64
See also
Defined in
On the server
Encodes a value as Base64.
Uses util.Base64Encode without line breaks; it is binary safe, so NULL characters need no special
treatment.
Parameters
- str Any Value to encode; converted with
tostring
Returns
- String The Base64 encoded string
See also
On the client
Encodes data as base64.
A thin wrapper over util.Base64Encode; it is binary safe and the output is never line-wrapped.
Parameters
- data String The data to encode; other values are converted with
tostring
Returns
- String The base64 text