From 17c2c0812491871c1955ccff873539b005d0acce Mon Sep 17 00:00:00 2001 From: louib Date: Sat, 14 Feb 2026 12:46:44 -0500 Subject: [PATCH] chore: bump rand version --- Cargo.toml | 2 +- README.md | 2 +- examples/configuration_hmac.rs | 2 +- src/hmacmode.rs | 4 +--- src/otpmode.rs | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3674519..32097fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ nusb = ["dep:nusb"] default = ["rusb"] [dependencies] -rand = "0.9" +rand = "0.10" bitflags = "2.10" structure = "0.1" aes = "0.8" diff --git a/README.md b/README.md index f56f159..b9f2719 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ use challenge_response::hmacmode::{ }; use challenge_response::ChallengeResponse; use rand::distr::Alphanumeric; -use rand::{rng, Rng}; +use rand::{rng, RngExt}; fn main() { let mut cr_client = match ChallengeResponse::new() { diff --git a/examples/configuration_hmac.rs b/examples/configuration_hmac.rs index efa2ea7..db5c9c6 100644 --- a/examples/configuration_hmac.rs +++ b/examples/configuration_hmac.rs @@ -6,7 +6,7 @@ use challenge_response::configure::DeviceModeConfig; use challenge_response::hmacmode::HmacKey; use challenge_response::ChallengeResponse; use rand::distr::Alphanumeric; -use rand::{rng, Rng}; +use rand::{rng, RngExt}; fn main() { let mut challenge_response = ChallengeResponse::new().unwrap(); diff --git a/src/hmacmode.rs b/src/hmacmode.rs index 9582227..b5fe650 100644 --- a/src/hmacmode.rs +++ b/src/hmacmode.rs @@ -1,7 +1,5 @@ -use std; - -use crate::rand::Rng; use crate::sec::hmac_sha1; +use rand::{Rng, RngExt}; /// Size of the secret used by the HMAC algorithm pub const HMAC_SECRET_SIZE: usize = 20; diff --git a/src/otpmode.rs b/src/otpmode.rs index 0afa0e8..3fcb41c 100644 --- a/src/otpmode.rs +++ b/src/otpmode.rs @@ -4,7 +4,7 @@ use aes::cipher::generic_array::typenum::U16; use aes::cipher::generic_array::GenericArray; use aes::cipher::{BlockDecrypt, KeyInit}; use aes::Aes128; -use rand::Rng; +use rand::{Rng, RngExt}; use std; #[repr(C)]