fn decode_b64(b64: &str, is_url_variant: bool) -> Result<Vec<u8>, TokenError> {
        let variant = if is_url_variant {
            base64::Variant::UrlSafeNoPadding
        } else {
            base64::Variant::Original
        };
        base64::decode(b64, variant).map_err(|_| TokenError::InvalidBase64)
    }
/// Decodes a base64 byte array with the option to choose between the URL variant and original
/// variant.
Decodes a base64 byte array with the option to choose between the URL variant and original
variant.
Decodes a base64 byte array with the option to choose between the URL variant and original variant .
fn decode_b64(b64: &str, is_url_variant: bool) -> Result<Vec<u8>, TokenError> {
        let variant = if is_url_variant {
            base64::Variant::UrlSafeNoPadding
        } else {
            base64::Variant::Original
        };
        base64::decode(b64, variant).map_err(|_| TokenError::InvalidBase64)
    }
fn decode_b64 ( b64 : & str , is_url_variant : bool ) -> Result < Vec < u8 > , TokenError > { let variant = if is_url_variant { base64 :: Variant :: UrlSafeNoPadding } else { base64 :: Variant :: Original } ; base64 :: decode ( b64 , variant ) . map_err ( | _ | TokenError :: InvalidBase64 ) }
Decodes a base64 byte array with the option to choose between the URL variant and original
variant.
Decodes a base64 byte array with the option to choose between the URL variant and original variant .
b64
&str
is_url_variant
bool