Import with #import "std/base64".

Base64EncodeInto :: (bytes: []u8, output: *Vec(u8))

Appends the standard padded RFC 4648 base64 encoding of BYTES to OUTPUT.

Base64Encode :: (bytes: []u8) -> Text

The standard padded RFC 4648 base64 text for BYTES.

Base64DecodeInto :: (text: string, output: *Vec(u8)) -> bool

Appends the bytes decoded from TEXT to OUTPUT. Accepts standard (+/) and URL-safe (-_) alphabets and skips ASCII whitespace; refuses bad characters, truncated groups or misplaced '=' padding.

Base64Decode :: (text: string, ok: *bool) -> Text

Decodes TEXT into byte text and sets OK to whether TEXT was valid base64.

Source ↗ · All modules