mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-06 05:17:42 +00:00
Upgrade rand to 0.9.1
This commit is contained in:
@@ -42,8 +42,9 @@ fn encrypt<T: aes_gcm::aead::Aead>(
|
||||
data: &[u8],
|
||||
) -> Result<Vec<u8>, crate::Error> {
|
||||
use crate::error::Error;
|
||||
use aes_gcm::aead::rand_core::OsRng;
|
||||
|
||||
let nonce = T::generate_nonce(rand::thread_rng());
|
||||
let nonce = T::generate_nonce(&mut OsRng);
|
||||
|
||||
let encryptor = stream.encrypt(&nonce, data).map_err(Error::ErrEncryptFailed)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user