mirror of
https://github.com/Momoko-Ayase/Senbei.git
synced 2026-09-19 03:57:59 -04:00
Upgrade dependencies to latest stable
zip 0.6.6 -> 8.6.0 (the 0.6 line is unmaintained), aes 0.8 -> 0.9 (BlockCipherDecrypt trait replaces BlockDecrypt), sha2 0.10 -> 0.11 (Array no longer formats as hex; local hex_digest helpers). Outputs are byte-identical across the upgrade: full golden corpus and Android corpus sidecars all pass.
This commit is contained in:
@@ -77,7 +77,11 @@ fn sha256_hex(data: &[u8]) -> String {
|
||||
use sha2::Digest;
|
||||
let mut digest = sha2::Sha256::new();
|
||||
digest.update(data);
|
||||
format!("{:x}", digest.finalize())
|
||||
let mut out = String::with_capacity(64);
|
||||
for byte in digest.finalize() {
|
||||
out.push_str(&format!("{byte:02x}"));
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// `<stem>.golden.so.sha256` next to `input`.
|
||||
|
||||
Reference in New Issue
Block a user