Struct jwt_simple::prelude::Base64UrlSafe
source · pub struct Base64UrlSafe;
Trait Implementations§
source§impl Decoder for Base64UrlSafe
impl Decoder for Base64UrlSafe
source§fn decode<IN, 't>(
bin: &'t mut [u8],
b64: IN,
ignore: Option<&[u8]>
) -> Result<&'t [u8], Error>where
IN: AsRef<[u8]>,
fn decode<IN, 't>(
bin: &'t mut [u8],
b64: IN,
ignore: Option<&[u8]>
) -> Result<&'t [u8], Error>where
IN: AsRef<[u8]>,
Decode
encoded
into bin
.
The output buffer can be larger than required; the returned slice is
a view of the buffer with the correct length.
ignore
is an optional set of characters to ignore.source§impl Encoder for Base64UrlSafe
impl Encoder for Base64UrlSafe
source§fn encoded_len(bin_len: usize) -> Result<usize, Error>
fn encoded_len(bin_len: usize) -> Result<usize, Error>
Length of
bin_len
bytes after encoding.source§fn encode<IN>(b64: &mut [u8], bin: IN) -> Result<&[u8], Error>where
IN: AsRef<[u8]>,
fn encode<IN>(b64: &mut [u8], bin: IN) -> Result<&[u8], Error>where
IN: AsRef<[u8]>,
Encode
bin
into encoded
.
The output buffer can be larger than required; the returned slice is
a view of the buffer with the correct length.