base64_encode

Function base64_encode 

Source
pub fn base64_encode(text: &str) -> String
Expand description

RFC 4648 §5 — the URL-and-filename-safe alphabet, without padding.

§5 rather than §4 because every place a Beck program will put one of these is a place + and / have to be escaped: a URL, a filename, a JOSE segment. Padding is omitted for the same reason — = is %3D in a query string — and base64_decode accepts it anyway, because a decoder that refuses what other encoders emit is a decoder that fails in production.