base64: be a tolerant reader
This commit is contained in:
@@ -81,3 +81,8 @@ impl Config {
|
||||
self.files.iter().find(|f| f.path == path)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn base64_decode(s: &str) -> Result<Vec<u8>, base64::DecodeError> {
|
||||
use base64::{prelude::BASE64_STANDARD_NO_PAD as B64, Engine};
|
||||
B64.decode(s.trim_end_matches('='))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user