std1.0.0-beta-7 SafeC docs

Module encoding::base64

#include <std/encoding/base64.h> source

Base64 (RFC 4648, standard alphabet + '=' padding)

Functions

base64_encodeEncodes the bytes of 'data' into standard Base64 text (with '=' padding, no line-wrapping).
base64_decodeDecodes standard Base64 text (whitespace between groups is tolerated and skipped; anything else invalid — a non-alphabet, non-'=' byte, or '=' appearing somewhere other than as trailing padding — sets '*ok' (if non-NULL) to 0 and returns an empty Vec). On success, '*ok' is set to 1 and the returned Vec<unsigned char> holds the decoded data; free it with Vec::free() same as any other Vec.