uce/site/doc/pages/base64_encode.txt
2026-06-16 23:02:45 +00:00

18 lines
415 B
Plaintext

:sig
String base64_encode(String raw)
:params
raw : binary-safe source bytes
return value : the Base64-encoded text
:content
Encodes bytes as Base64 text. UCE strings are binary-safe, so `raw` may contain NUL and other non-text bytes — handy for embedding `random_bytes()` or a `sha256()` digest in headers, cookies, or JSON.
:example
print(base64_encode("hello"), "\n");
:see
>uri
base64_decode
random_bytes