From 2f24c7a70c4de79a783a464f813cf7cb2b8f5dc0 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Sun, 3 Aug 2025 21:22:23 +0200 Subject: [PATCH] chore(deps): Update rand to 0.9 (#2367) --- Cargo.lock | 10 +++++----- plugins/notification/Cargo.toml | 2 +- plugins/stronghold/Cargo.toml | 6 +++--- plugins/stronghold/src/kdf.rs | 2 +- plugins/websocket/Cargo.toml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c4022a45..e4fc7ccda 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6708,7 +6708,7 @@ dependencies = [ "log", "maplit", "notify-rust", - "rand 0.8.5", + "rand 0.9.0", "serde", "serde_json", "serde_repr", @@ -6865,9 +6865,9 @@ dependencies = [ "iota-crypto", "iota_stronghold", "log", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand 0.9.0", + "rand_chacha 0.9.0", + "rand_core 0.9.3", "rust-argon2 2.1.0", "rusty-fork", "serde", @@ -6933,7 +6933,7 @@ dependencies = [ "futures-util", "http", "log", - "rand 0.8.5", + "rand 0.9.0", "serde", "serde_json", "tauri", diff --git a/plugins/notification/Cargo.toml b/plugins/notification/Cargo.toml index 5484f0956..10ef6267a 100644 --- a/plugins/notification/Cargo.toml +++ b/plugins/notification/Cargo.toml @@ -30,7 +30,7 @@ serde_json = { workspace = true } tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } -rand = "0.8" +rand = "0.9" time = { version = "0.3", features = ["serde", "parsing", "formatting"] } url = { version = "2", features = ["serde"] } serde_repr = "0.1" diff --git a/plugins/stronghold/Cargo.toml b/plugins/stronghold/Cargo.toml index cdc7384c3..7a8229f37 100644 --- a/plugins/stronghold/Cargo.toml +++ b/plugins/stronghold/Cargo.toml @@ -34,11 +34,11 @@ iota-crypto = "0.23" hex = "0.4" zeroize = { version = "1", features = ["zeroize_derive"] } rust-argon2 = { version = "2", optional = true } -rand_chacha = { version = "0.3.1", optional = true } -rand_core = { version = "0.6.4", features = ["getrandom"], optional = true } +rand_chacha = { version = "0.9", optional = true } +rand_core = { version = "0.9", features = ["os_rng"], optional = true } [dev-dependencies] -rand = "0.8" +rand = "0.9" rusty-fork = "0.3" [features] diff --git a/plugins/stronghold/src/kdf.rs b/plugins/stronghold/src/kdf.rs index 94e7b677e..2389b1c41 100644 --- a/plugins/stronghold/src/kdf.rs +++ b/plugins/stronghold/src/kdf.rs @@ -32,7 +32,7 @@ fn create_or_get_salt(salt: &mut [u8], salt_path: &Path) { salt.clone_from_slice(&tmp); } else { // Generate new salt - let mut gen = ChaCha20Rng::from_entropy(); + let mut gen = ChaCha20Rng::from_os_rng(); gen.fill_bytes(salt); std::fs::write(salt_path, salt).expect("Failed to write salt for Stronghold") } diff --git a/plugins/websocket/Cargo.toml b/plugins/websocket/Cargo.toml index a0a5b9291..40db186ee 100644 --- a/plugins/websocket/Cargo.toml +++ b/plugins/websocket/Cargo.toml @@ -31,7 +31,7 @@ tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } http = "1" -rand = "0.8" +rand = "0.9" futures-util = "0.3" tokio = { version = "1", features = ["net", "sync"] } tokio-tungstenite = { version = "0.27" }