Skip to content

Commit 2ea2995

Browse files
committed
Replace rand_chacha references
1 parent cd3082e commit 2ea2995

File tree

12 files changed

+10
-21
lines changed

12 files changed

+10
-21
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ jobs:
4545
run: cargo doc --all-features --no-deps
4646
- name: rand_core
4747
run: cargo doc --all-features --package rand_core --no-deps
48-
- name: rand_chacha
49-
run: cargo doc --all-features --package rand_chacha --no-deps
5048
- name: rand_pcg
5149
run: cargo doc --all-features --package rand_pcg --no-deps
5250

@@ -139,8 +137,6 @@ jobs:
139137
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml --no-default-features --features=os_rng
140138
- name: Test rand_pcg
141139
run: cargo test --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde
142-
- name: Test rand_chacha
143-
run: cargo test --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml --features=serde
144140

145141
test-cross:
146142
runs-on: ${{ matrix.os }}
@@ -173,7 +169,6 @@ jobs:
173169
cross test --no-fail-fast --target ${{ matrix.target }} --examples
174170
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml
175171
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde
176-
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml
177172
178173
test-miri:
179174
runs-on: ubuntu-latest
@@ -192,7 +187,6 @@ jobs:
192187
cargo miri test --manifest-path rand_core/Cargo.toml --features=serde
193188
cargo miri test --manifest-path rand_core/Cargo.toml --no-default-features
194189
cargo miri test --manifest-path rand_pcg/Cargo.toml --features=serde
195-
cargo miri test --manifest-path rand_chacha/Cargo.toml --no-default-features
196190
197191
test-no-std:
198192
runs-on: ubuntu-latest

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
@@ -6,14 +6,14 @@
66
// option. This file may not be copied, modified, or distributed
77
// except according to those terms.
88

9+
use chacha20::rand_core::UnwrapErr;
10+
use chacha20::{ChaCha8Rng, ChaCha12Rng, ChaCha20Core, ChaCha20Rng};
911
use core::time::Duration;
1012
use criterion::measurement::WallTime;
1113
use criterion::{BenchmarkGroup, Criterion, black_box, criterion_group, criterion_main};
1214
use rand::prelude::*;
1315
use rand::rngs::OsRng;
1416
use rand::rngs::ReseedingRng;
15-
use rand_chacha::rand_core::UnwrapErr;
16-
use rand_chacha::{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
@@ -10,11 +10,11 @@
1010
1111
#![cfg_attr(feature = "simd_support", feature(portable_simd))]
1212

13+
use chacha20::ChaCha8Rng;
1314
use core::time::Duration;
1415
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
1516
use rand::distr::uniform::{SampleRange, Uniform};
1617
use rand::prelude::*;
17-
use rand_chacha::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
@@ -12,11 +12,11 @@
1212
//!
1313
//! - sample: current method: (x12 - 1.0) * (b - a) + a
1414
15+
use chacha20::ChaCha8Rng;
1516
use core::time::Duration;
1617
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
1718
use rand::distr::uniform::{SampleUniform, Uniform, UniformSampler};
1819
use rand::prelude::*;
19-
use rand_chacha::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: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
//! - The [`rand_jitter`] crate provides a user-space implementation of
5858
//! entropy harvesting from CPU timer jitter, but is very slow and has
5959
//! [security issues](https://github.com/rust-random/rand/issues/699).
60-
//! - The [`rand_chacha`] crate provides portable implementations of
61-
//! generators derived from the [ChaCha] family of stream ciphers
6260
//! - The [`rand_pcg`] crate provides portable implementations of a subset
6361
//! of the [PCG] family of small, insecure generators
6462
//! - The [`rand_xoshiro`] crate provides portable implementations of the
@@ -87,7 +85,6 @@
8785
//! [`SeedableRng`]: crate::SeedableRng
8886
//! [`rdrand`]: https://crates.io/crates/rdrand
8987
//! [`rand_jitter`]: https://crates.io/crates/rand_jitter
90-
//! [`rand_chacha`]: https://crates.io/crates/rand_chacha
9188
//! [`rand_pcg`]: https://crates.io/crates/rand_pcg
9289
//! [`rand_xoshiro`]: https://crates.io/crates/rand_xoshiro
9390
//! [crates with the `rng` tag]: https://crates.io/keywords/rng

0 commit comments

Comments
 (0)