Skip to content

Commit 7e6974d

Browse files
committed
Update chacha20 and use chacha20::ChaChaCore
1 parent bfa14ab commit 7e6974d

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ exclude = ["benches", "distr_test"]
7575
rand_core = { version = "0.10.0-rc-6", default-features = false }
7676
log = { version = "0.4.4", optional = true }
7777
serde = { version = "1.0.103", features = ["derive"], optional = true }
78-
chacha20 = { version = "0.10.0-rc.9", default-features = false, features = ["rng"], optional = true }
78+
chacha20 = { version = "0.10.0-rc.10", default-features = false, features = ["rng"], optional = true }
7979
getrandom = { version = "0.4.0-rc.1", optional = true }
8080

8181
[dev-dependencies]

src/rngs/std.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
use core::convert::Infallible;
1212
use rand_core::{SeedableRng, TryCryptoRng, TryRng};
1313

14-
#[cfg(any(test, feature = "sys_rng"))]
15-
pub(crate) use chacha20::ChaCha12Core as Core;
16-
1714
use chacha20::ChaCha12Rng as Rng;
1815

1916
/// A strong, fast (amortized), non-portable RNG

src/rngs/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use std::fmt;
1414
use std::rc::Rc;
1515
use std::thread_local;
1616

17-
use super::std::Core;
1817
use super::{SysError, SysRng};
1918
use rand_core::SeedableRng;
2019
use rand_core::block::{BlockRng, Generator};
@@ -39,6 +38,7 @@ use rand_core::{TryCryptoRng, TryRng};
3938
// of 32 kB and less. We choose 64 kB to avoid significant overhead.
4039
const THREAD_RNG_RESEED_THRESHOLD: i64 = 1024 * 64;
4140

41+
type Core = chacha20::ChaChaCore<chacha20::R12, chacha20::variants::Legacy>;
4242
type Results = <Core as Generator>::Output;
4343

4444
struct ReseedingCore {

0 commit comments

Comments
 (0)