pub fn decode_url_safe<T>(input: T) -> Result<Vec<u8>, Error>Expand description
Decode a base64url encoded string using the URL safe base64 decoding scheme. (base64url)
§Arguments
input- The base64url encoded input data to decode, which can be any type that implementsAsRef<[u8]>.
§Returns
A Result containing a Vec<u8> with the decoded data, or an error if the input is not valid base64url.
§Examples
let encoded = "SGVsbG8sIHdvcmxkIQ";
let decoded = base64::decode_url_safe(encoded).expect("Decoding should succeed");
assert_eq!(decoded, b"Hello, world!");