diff options
Diffstat (limited to 'azalea-crypto')
| -rw-r--r-- | azalea-crypto/Cargo.toml | 2 | ||||
| -rw-r--r-- | azalea-crypto/src/lib.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/azalea-crypto/Cargo.toml b/azalea-crypto/Cargo.toml index 04f6217a..49b56a7d 100644 --- a/azalea-crypto/Cargo.toml +++ b/azalea-crypto/Cargo.toml @@ -14,7 +14,7 @@ aes.workspace = true azalea-buf = { workspace = true, optional = true } cfb8.workspace = true num-bigint.workspace = true -rand = { workspace = true, features = ["os_rng"] } +rand = { workspace = true, features = ["sys_rng"] } # TODO: Remove when rand is fixed. rand_core.workspace = true rsa = { workspace = true, features = ["sha2"] } diff --git a/azalea-crypto/src/lib.rs b/azalea-crypto/src/lib.rs index 948b3715..abedaee8 100644 --- a/azalea-crypto/src/lib.rs +++ b/azalea-crypto/src/lib.rs @@ -8,7 +8,7 @@ use aes::{ Aes128, cipher::{BlockDecryptMut, BlockEncryptMut, KeyIvInit, inout::InOutBuf}, }; -use rand::{TryRngCore, rngs::OsRng}; +use rand::{TryRngCore, rngs::SysRng}; use sha1::{Digest, Sha1}; #[cfg(feature = "signing")] @@ -30,7 +30,7 @@ pub fn make_salt() -> u64 { fn generate_secret_key() -> [u8; 16] { let mut key = [0u8; 16]; - OsRng.try_fill_bytes(&mut key).unwrap(); + SysRng.try_fill_bytes(&mut key).unwrap(); key } |
