std1.0.0-beta-7 SafeC docs

std :: encoding::base64

Function std::base64_decode

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

struct Vec<unsigned char> base64_decode(const &char s, ?&int ok)

Decodes 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.