Merge pull request 'Update Rust crate rand to 0.10' (#9) from renovate/rand-0.x into main
All checks were successful
Build and Test / rust-boss (push) Successful in 6m7s
All checks were successful
Build and Test / rust-boss (push) Successful in 6m7s
Reviewed-on: #9
This commit is contained in:
commit
36a07f798b
2 changed files with 3 additions and 3 deletions
|
|
@ -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"] }
|
||||
|
|
|
|||
|
|
@ -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