Update Rust crate rand to 0.10 #9

Merged
bloxerhd018 merged 2 commits from renovate/rand-0.x into main 2026-05-26 15:48:36 +02:00
2 changed files with 3 additions and 3 deletions

View file

@ -20,7 +20,7 @@ aes = "0.9"
ctr = "0.10"
hmac = "0.12"
md-5 = "0.11"
rand = "0.8"
rand = "0.10"
anyhow = "1.0"
base64 = "0.22"
reqwest = { version = "0.13", features = ["json"] }

View file

@ -3,7 +3,7 @@ use ctr::cipher::{KeyIvInit, StreamCipher};
use hmac::{Hmac, Mac};
use sha2::Sha256;
use md5::{Md5, Digest};
use rand::RngCore;
use rand::Rng;
use anyhow::{Result, bail};
type HmacSha256 = Hmac<Sha256>;
@ -84,7 +84,7 @@ pub fn encrypt_wiiu(content: &[u8], aes_key: &[u8], hmac_key: &[u8]) -> Result<V
plaintext.extend_from_slice(content);
let mut iv12 = [0u8; 12];
rand::thread_rng().fill_bytes(&mut iv12);
rand::rng().fill_bytes(&mut iv12);
let mut iv = Vec::with_capacity(16);
iv.extend_from_slice(&iv12);