Replace standalone md5 crate with RustCrypto md-5
The standalone `md5` (0.8.0) crate is replaced with `md-5` (0.10) from the RustCrypto ecosystem, which shares `digest v0.10` with sha2, argon2, blake2 and other crates already in the dependency tree — eliminating one redundant implementation. https://claude.ai/code/session_01V23pGpfNw5ujZvtwRFG6qy
This commit is contained in:
@@ -496,7 +496,10 @@ impl ChunkedUploadService {
|
||||
if let Some(ref expected_checksum) = checksum {
|
||||
let data_clone = data.clone(); // Bytes::clone is O(1) — just an Arc increment
|
||||
let actual_checksum =
|
||||
tokio::task::spawn_blocking(move || format!("{:x}", md5::compute(&data_clone)))
|
||||
tokio::task::spawn_blocking(move || {
|
||||
use md5::{Md5, Digest};
|
||||
format!("{:x}", Md5::digest(&data_clone))
|
||||
})
|
||||
.await
|
||||
.map_err(|e| format!("MD5 checksum task failed: {e}"))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user