Signature
String base64_encode(String raw)
Parameters
raw : binary-safe source bytes
return value : the Base64-encoded text
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");
Output
aGVsbG8=