Skip to content

Commit 53ac6f7

Browse files
committed
Replace rand_chacha references
1 parent d7745a6 commit 53ac6f7

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ distribution.
7777

7878
We aim to provide security fixes in the form of a new patch version for the
7979
latest release version of `rand` and its dependencies `rand_core` and
80-
`rand_chacha`, as well as for prior major and minor releases which were, at some
80+
`chacha20`, as well as for prior major and minor releases which were, at some
8181
time during the previous 12 months, the latest release version.
8282

8383
## Reporting a Vulnerability

benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rand_core = { path = "../rand_core" }
1818
[dev-dependencies]
1919
rand = { path = "..", features = ["small_rng", "nightly"] }
2020
rand_pcg = { path = "../rand_pcg" }
21-
rand_chacha = { path = "../rand_chacha" }
21+
chacha20 = { version = "=0.10.0-rc.2", default-features = false, features = ["rng"] }
2222
criterion = "0.5"
2323
criterion-cycles-per-byte = "0.6"
2424

benches/benches/generators.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use criterion::{BenchmarkGroup, Criterion, black_box, criterion_group, criterion
1212
use rand::prelude::*;
1313
use rand::rngs::OsRng;
1414
use rand::rngs::ReseedingRng;
15-
use rand_chacha::rand_core::UnwrapErr;
16-
use rand_chacha::{ChaCha8Rng, ChaCha12Rng, ChaCha20Core, ChaCha20Rng};
15+
use chacha20::rand_core::UnwrapErr;
16+
use chacha20::{ChaCha8Rng, ChaCha12Rng, ChaCha20Core, ChaCha20Rng};
1717
use rand_pcg::{Pcg32, Pcg64, Pcg64Dxsm, Pcg64Mcg};
1818

1919
criterion_group!(

benches/benches/seq_choose.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub fn bench(c: &mut Criterion) {
9494
b.iter(|| x.iter().cloned().sample_fill(&mut rng, &mut buf))
9595
});
9696

97-
bench_rng::<rand_chacha::ChaCha20Rng>(c, "ChaCha20");
97+
bench_rng::<chacha20::ChaCha20Rng>(c, "ChaCha20");
9898
bench_rng::<rand_pcg::Pcg32>(c, "Pcg32");
9999
bench_rng::<rand_pcg::Pcg64>(c, "Pcg64");
100100
}

benches/benches/shuffle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn bench(c: &mut Criterion) {
3030
})
3131
});
3232

33-
bench_rng::<rand_chacha::ChaCha12Rng>(c, "ChaCha12");
33+
bench_rng::<chacha20::ChaCha12Rng>(c, "ChaCha12");
3434
bench_rng::<rand_pcg::Pcg32>(c, "Pcg32");
3535
bench_rng::<rand_pcg::Pcg64>(c, "Pcg64");
3636
}

benches/benches/uniform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use core::time::Duration;
1414
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
1515
use rand::distr::uniform::{SampleRange, Uniform};
1616
use rand::prelude::*;
17-
use rand_chacha::ChaCha8Rng;
17+
use chacha20::ChaCha8Rng;
1818
use rand_pcg::{Pcg32, Pcg64};
1919
#[cfg(feature = "simd_support")]
2020
use std::simd::{Simd, num::SimdUint};

benches/benches/uniform_float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use core::time::Duration;
1616
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
1717
use rand::distr::uniform::{SampleUniform, Uniform, UniformSampler};
1818
use rand::prelude::*;
19-
use rand_chacha::ChaCha8Rng;
19+
use chacha20::ChaCha8Rng;
2020
use rand_pcg::{Pcg32, Pcg64};
2121

2222
const WARM_UP_TIME: Duration = Duration::from_millis(1000);

rand_pcg/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
//! [`SeedableRng::from_rng`]: rand_core::SeedableRng#method.from_rng
7878
//! [`rand::rng`]: https://docs.rs/rand/latest/rand/fn.rng.html
7979
//! [`rand::Rng`]: https://docs.rs/rand/latest/rand/trait.Rng.html
80-
//! [`rand_chacha::ChaCha8Rng`]: https://docs.rs/rand_chacha/latest/rand_chacha/struct.ChaCha8Rng.html
8180
8281
#![doc(
8382
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",

src/rngs/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@
5555
//! - The [`rand_jitter`] crate provides a user-space implementation of
5656
//! entropy harvesting from CPU timer jitter, but is very slow and has
5757
//! [security issues](https://github.com/rust-random/rand/issues/699).
58-
//! - The [`rand_chacha`] crate provides portable implementations of
59-
//! generators derived from the [ChaCha] family of stream ciphers
58+
//! - The [`chacha20`] and [`rand_chacha`] crates provides portable
59+
//! implementations of generators derived from the [ChaCha] family of
60+
//! stream ciphers
6061
//! - The [`rand_pcg`] crate provides portable implementations of a subset
6162
//! of the [PCG] family of small, insecure generators
6263
//! - The [`rand_xoshiro`] crate provides portable implementations of the
@@ -83,6 +84,7 @@
8384
//! [`SeedableRng`]: crate::SeedableRng
8485
//! [`rdrand`]: https://crates.io/crates/rdrand
8586
//! [`rand_jitter`]: https://crates.io/crates/rand_jitter
87+
//! [`chacha20`]: https://crates.io/crates/chacha20
8688
//! [`rand_chacha`]: https://crates.io/crates/rand_chacha
8789
//! [`rand_pcg`]: https://crates.io/crates/rand_pcg
8890
//! [`rand_xoshiro`]: https://crates.io/crates/rand_xoshiro

src/rngs/small.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ type Rng = super::xoshiro256plusplus::Xoshiro256PlusPlus;
7878
/// [`StdRng`]: crate::rngs::StdRng
7979
/// [rand_pcg]: https://crates.io/crates/rand_pcg
8080
/// [rand_xoshiro]: https://crates.io/crates/rand_xoshiro
81-
/// [`rand_chacha::ChaCha8Rng`]: https://docs.rs/rand_chacha/latest/rand_chacha/struct.ChaCha8Rng.html
8281
/// [`rand_seeder`]: https://docs.rs/rand_seeder/latest/rand_seeder/
8382
#[derive(Clone, Debug, PartialEq, Eq)]
8483
pub struct SmallRng(Rng);

0 commit comments

Comments
 (0)