flibs/strings - Encode/decode base64 strings
The base64 module contains two routines, one to encode a sequence of bytes (stored as a character string) to a string of characters according to the base64 scheme and one to convert a base64 string back to the original bytes (again stored as a character string).
To import the definitions, use this module.
Convert the input string string and return the base64 result in the second argument.
The string to be converted
The string holding the encoding. Note that the string is automatically allocated to the right size. If necessary, padding ("=" characters) is added.
Convert the base64 input string encoded_string and return the decoded result in the second argument.
The base64 string to be converted back to the original.
The string holding the original sequence of bytes. Note that the string is automatically allocated to the right size. Padding ("=" characters) is optional. Spaces in or surrounding the base64 string are ignored.
If the base64 string contains invalid characters, then this argument is set to true, otherwise it is to set to false and the output argument will contain the decoded sequence of bytes.
Copyright © 2019 Arjen Markus <arjenmarkus@sourceforge.net>