Fix Changes in rand 0.10
All checks were successful
Build and Test / rust-boss (push) Successful in 6m20s

This commit is contained in:
BloxerHD 2026-05-26 14:41:08 +01:00
commit 02054991b0
Signed by: bloxerhd018
SSH key fingerprint: SHA256:ItSfcfhpXlfkMK3uQSDYW5X3XKm0hbHWQqWcCK57px8

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);