Base64 module

base64url_decode

procedure · 1 overloadSource

The bytes that URL-safe Base64 text encodes, and whether all of it was valid. Padding is optional. Errors and ownership are as for base64_decode: the result is empty when success is false, and the caller frees it.

base64url_decode :: (input: string) -> (string, success: bool)

Parameters

input: string

Returns

string
success: bool
ExampleOpen in playground ↗
decoded, ok := base64url_decode("-_8");
defer free(decoded);
assert(ok && decoded == "\xfb\xff");

See also