base64Encode

base64Encode simply converts ascii to base64 with appropriate wrapping and padding. Encoding is done by loading three ascii characters at a time into a bitField, and then extracting them as four base64 values. returnString is assumed to be large enough to contain the result (which is typically 4 / 3 the input size plus line breaks), and the function return is the length of the result wrapLength sets the length at which to wrap the encoded test at (not valid with byLineFlag) padFlag controls whether the one or two '=' pad characters are included at the end of encoding byLineFlag causes each input line to be encoded as a separate base64 string

pure nothrow @safe @nogc
int
base64Encode
(
ref char[] resultString
,
const char[] asciiString
,,
size_t wrapLength
,
bool padFlag
,)

Meta