diff --git a/crates/e2e_test/src/distributed_startup_regression_test.rs b/crates/e2e_test/src/distributed_startup_regression_test.rs index 3389eb876..ebe98d5a2 100644 --- a/crates/e2e_test/src/distributed_startup_regression_test.rs +++ b/crates/e2e_test/src/distributed_startup_regression_test.rs @@ -399,7 +399,7 @@ mod tests { } hash.update(&buf[..len]); } - Ok(format!("{:x}", hash.finalize())) + Ok(rustfs_utils::crypto::hex(hash.finalize())) } fn startup_cas_git(args: &[&str]) -> std::io::Result { diff --git a/crates/ecstore/src/core/pools.rs b/crates/ecstore/src/core/pools.rs index 3854b2933..dc941b20c 100644 --- a/crates/ecstore/src/core/pools.rs +++ b/crates/ecstore/src/core/pools.rs @@ -5519,7 +5519,7 @@ where let observation = std::env::var_os("RUSTFS_E2E_STARTUP_CAS_NONCE").map(|_| { serde_json::json!({ "kind": "cas", "object": object, "phase": phase, - "payload_sha256": format!("{:x}", Sha256::digest(&data)), + "payload_sha256": rustfs_utils::crypto::hex(Sha256::digest(&data)), "if_match": opts.http_preconditions.as_ref().and_then(|p| p.if_match.as_deref()), "if_none_match": opts.http_preconditions.as_ref().and_then(|p| p.if_none_match.as_deref()), "tail_drained": opts.write_completion == crate::object_api::WriteCompletion::TailDrained, @@ -6843,7 +6843,7 @@ impl PoolMeta { #[cfg(feature = "e2e-test-hooks")] startup_cas_test_observe(serde_json::json!({ "kind": "confirmed", "object": POOL_META_NAME, - "payload_sha256": format!("{:x}", Sha256::digest(&durable)), + "payload_sha256": rustfs_utils::crypto::hex(Sha256::digest(&durable)), "generation": confirmed.revision.generation, "transaction_id": confirmed.revision.transaction_id, })); diff --git a/rustfs/src/storage/rpc/node_service/disk.rs b/rustfs/src/storage/rpc/node_service/disk.rs index e8a7ee4fd..fb237b31c 100644 --- a/rustfs/src/storage/rpc/node_service/disk.rs +++ b/rustfs/src/storage/rpc/node_service/disk.rs @@ -56,7 +56,7 @@ fn startup_cas_rename_observation( "target": match target { LocalMutationTarget::Ready(_) => "ready", LocalMutationTarget::Bootstrap(_) => "bootstrap", LocalMutationTarget::Unbound => "unbound" }, "disk": request.disk, "src_volume": request.src_volume, "src_path": request.src_path, "dst_volume": request.dst_volume, "dst_path": request.dst_path, - "body_sha256": format!("{:x}", Sha256::digest(body)), + "body_sha256": rustfs_utils::crypto::hex(Sha256::digest(body)), "etag": file_info.metadata.get("etag"), "mod_time": file_info.mod_time.map(|time| time.unix_timestamp_nanos().to_string()), }))