Skip to content

Commit 9258429

Browse files
mdecimusctron
authored andcommitted
Use base64 standard alphabet for integrity hashes (closes #765)
1 parent 7a95dc4 commit 9258429

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/processing/integrity.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
33
use crate::config::RtcBuild;
44
use crate::pipelines::Attrs;
5-
use base64::{display::Base64Display, engine::general_purpose::URL_SAFE, Engine};
5+
use base64::engine::general_purpose::STANDARD;
6+
use base64::{display::Base64Display, Engine};
67
use sha2::{Digest, Sha256, Sha384, Sha512};
78
use std::collections::HashMap;
89
use std::convert::Infallible;
@@ -85,7 +86,7 @@ impl Debug for OutputDigest {
8586
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
8687
f.debug_struct("OutputDigest")
8788
.field("integrity", &self.integrity)
88-
.field("hash", &URL_SAFE.encode(&self.hash))
89+
.field("hash", &STANDARD.encode(&self.hash))
8990
.finish()
9091
}
9192
}
@@ -106,7 +107,7 @@ impl OutputDigest {
106107
IntegrityType::None => None,
107108
integrity => Some(format!(
108109
"{integrity}-{hash}",
109-
hash = Base64Display::new(&self.hash, &URL_SAFE)
110+
hash = Base64Display::new(&self.hash, &STANDARD)
110111
)),
111112
}
112113
}

0 commit comments

Comments
 (0)