Fix Changes in rand 0.10
All checks were successful
Build and Test / rust-boss (push) Successful in 6m20s
All checks were successful
Build and Test / rust-boss (push) Successful in 6m20s
This commit is contained in:
parent
de6ba8103d
commit
02054991b0
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue