From 4e3b521310e8bea177de7dff37f42e28bce10590 Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Thu, 30 Jan 2025 12:28:05 -0800 Subject: [PATCH] chore(deps): update rand requirement from 0.8 to 0.9 --- Cargo.toml | 2 +- src/aes.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bbd1f3fe7..61e81f628 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ indexmap = "2" hmac = { version = "0.12", optional = true, features = ["reset"] } memchr = "2.7" pbkdf2 = { version = "0.12", optional = true } -rand = { version = "0.8", optional = true } +rand = { version = "0.9", optional = true } sha1 = { version = "0.10", optional = true } thiserror = "2" time = { workspace = true, optional = true, features = [ diff --git a/src/aes.rs b/src/aes.rs index 6c9eb371f..1e593ad63 100644 --- a/src/aes.rs +++ b/src/aes.rs @@ -237,7 +237,7 @@ impl AesWriter { let mut encrypted_file_header = Vec::with_capacity(salt_length + 2); let mut salt = vec![0; salt_length]; - rand::thread_rng().fill_bytes(&mut salt); + rand::rng().fill_bytes(&mut salt); encrypted_file_header.write_all(&salt)?; // Derive a key from the password and salt. The length depends on the aes key length