fix(cache): format sha256 digest manually to resolve trait bound error
Update digest formatting to manually convert the SHA-256 result bytes to a hexadecimal string. This resolves a compilation error caused by upgrading the `sha2` crate to v0.11, where `LowerHex` is no longer implemented for the return type of `finalize()`.
This commit is contained in:
Generated
+236
-397
File diff suppressed because it is too large
Load Diff
+10
-10
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "mdrs-client-rust"
|
||||
version = "2.0.0"
|
||||
version = "2.0.1"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
authors = ["Neuroinformatics Unit, RIKEN CBS"]
|
||||
@@ -14,23 +14,23 @@ path = "src/main.rs"
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
reqwest = { version = "0.12", default-features = false, features = ["json", "multipart", "rustls-tls"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tokio = { version = "1.37", features = ["full"] }
|
||||
serde_json = "1.0.150"
|
||||
tokio = { version = "1.52.3", features = ["full"] }
|
||||
futures = "0.3"
|
||||
dirs = "5.0"
|
||||
dirs = "6.0.0"
|
||||
anyhow = "1.0.102"
|
||||
configparser = "3.1.0"
|
||||
configparser = "3.2.0"
|
||||
validators = "0.25.3"
|
||||
sha2 = "0.10"
|
||||
rpassword = "7.0"
|
||||
sha2 = "0.11.0"
|
||||
rpassword = "7.5.4"
|
||||
base64 = "0.22"
|
||||
fs2 = "0.4"
|
||||
ctrlc = "3"
|
||||
os_info = "3"
|
||||
os_info = "3.15.0"
|
||||
dotenvy = "0.15"
|
||||
unicode-normalization = "0.1"
|
||||
self-replace = "1"
|
||||
tar = "0.4"
|
||||
tar = "0.4.46"
|
||||
flate2 = "1"
|
||||
zip = "2"
|
||||
zip = "8.6.0"
|
||||
tempfile = "3"
|
||||
|
||||
Vendored
+2
-1
@@ -119,5 +119,6 @@ pub fn compute_digest(
|
||||
let json_str = python_digest_json(user, access, refresh, labs);
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(json_str.as_bytes());
|
||||
format!("{:x}", hasher.finalize())
|
||||
let result = hasher.finalize();
|
||||
result.iter().map(|b| format!("{:02x}", b)).collect()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user