base64
nimony/lib/std/base64.nim
Base64 encoder/decoder (RFC 4648).
encode produces standard base64 by default, or the URL- and filename-safe alphabet (-/_ instead of +//) when safe = true. decode accepts either alphabet and ignores = padding and whitespace.
func encode(s: openArray[T]; safe: bool): stringEncodes
s(a sequence ofchars orbytes) to a base64 string.func encodeMime(s: string; lineLen: int64; newLine: string; safe: bool): stringEncodes
sto base64 (RFC 2045 MIME): the output is wrapped into lines of at mostlineLencharacters, separated bynewLine.func decode(s: string): stringDecodes a base64 string (standard or URL-safe) back to the original bytes.
=padding and any whitespace/invalid characters are ignored.