feat: add wrap key encode
This commit is contained in:
@@ -29,6 +29,10 @@ pub fn encode_base64(input: &[u8]) -> String {
|
||||
general_purpose::STANDARD.encode(input)
|
||||
}
|
||||
|
||||
pub fn encode_base64_url_no_pad(input: &[u8]) -> String {
|
||||
general_purpose::URL_SAFE_NO_PAD.encode(input)
|
||||
}
|
||||
|
||||
pub fn decode_base64_url_no_pad(input: &str) -> XResult<Vec<u8>> {
|
||||
Ok(general_purpose::URL_SAFE_NO_PAD.decode(input)?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user