parsers: Bump base64

Version 0.21 replaced base64::decode() with an Engine trait and multiple
structs implementing it for various alphabets, various performance
profiles, etc.  It is slightly longer to import but in the end does the
very same thing.
This commit is contained in:
Emmanuel Gil Peyrot 2023-04-03 11:21:03 +02:00
commit 2955a0fe60
6 changed files with 44 additions and 23 deletions

View file

@ -331,6 +331,7 @@ generate_element!(
mod tests {
use super::*;
use crate::hashes::Algo;
use base64::{engine::general_purpose::STANDARD as Base64, Engine};
// Apparently, i686 and AArch32/PowerPC seem to disagree here. So instead
// of trying to figure this out now, we just ignore the test.
@ -383,7 +384,7 @@ mod tests {
assert_eq!(desc.file.hashes[0].algo, Algo::Sha_1);
assert_eq!(
desc.file.hashes[0].hash,
base64::decode("w0mcJylzCn+AfvuGdqkty2+KP48=").unwrap()
Base64.decode("w0mcJylzCn+AfvuGdqkty2+KP48=").unwrap()
);
}
@ -408,7 +409,7 @@ mod tests {
assert_eq!(desc.file.hashes[0].algo, Algo::Sha_1);
assert_eq!(
desc.file.hashes[0].hash,
base64::decode("w0mcJylzCn+AfvuGdqkty2+KP48=").unwrap()
Base64.decode("w0mcJylzCn+AfvuGdqkty2+KP48=").unwrap()
);
}