Skip to main content

base64url_bytes_to_bytes

Function base64url_bytes_to_bytes 

Source
pub fn base64url_bytes_to_bytes(bytes: &[u8]) -> Result<Vec<u8>, Base64UrlError>
Expand description

Decode RFC 4648 section 5 Base64URL bytes without padding.

This is useful for compact JWT/JWS/JWE segments that have already been split as bytes. It avoids requiring callers to first prove UTF-8 just to decode an ASCII Base64URL alphabet.