Skip to content

Commit a5a67cc

Browse files
authored
Fix typos (#54)
1 parent 83061f6 commit a5a67cc

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

rand_isaac/src/isaac.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl BlockRngCore for IsaacCore {
174174
type Item = u32;
175175
type Results = IsaacArray<Self::Item>;
176176

177-
/// Refills the output buffer, `results`. See also the pseudocode desciption
177+
/// Refills the output buffer, `results`. See also the pseudocode description
178178
/// of the algorithm in the `IsaacRng` documentation.
179179
///
180180
/// Optimisations used (similar to the reference implementation):

rand_isaac/src/isaac64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl BlockRngCore for Isaac64Core {
165165
type Item = u64;
166166
type Results = IsaacArray<Self::Item>;
167167

168-
/// Refills the output buffer, `results`. See also the pseudocode desciption
168+
/// Refills the output buffer, `results`. See also the pseudocode description
169169
/// of the algorithm in the `Isaac64Rng` documentation.
170170
///
171171
/// Optimisations used (similar to the reference implementation):

rand_jitter/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ without `std` support a timer must be supplied via `JitterRng::new_with_timer`.
3333

3434
## Quality testing
3535

36-
`JitterRng::new()` has build-in, but limited, quality testing, however
36+
`JitterRng::new()` has built-in, but limited, quality testing, however
3737
before using `JitterRng` on untested hardware, or after changes that could
38-
effect how the code is optimized (such as a new LLVM version), it is
39-
recommend to run the much more stringent
38+
affect how the code is optimized (such as a new LLVM version), it is
39+
recommended to run the much more stringent
4040
[NIST SP 800-90B Entropy Estimation Suite](https://github.com/usnistgov/SP800-90B_EntropyAssessment).
4141

4242
Use the following code using `timer_stats` to collect the data:
@@ -94,7 +94,7 @@ validate the estimation.
9494
restart.py -v jitter_rng_var.bin 8 <min-entropy>
9595
```
9696
2. Estimate the expected amount of entropy that is available in the last 4
97-
bits of the timer delta after running noice sources. Note that a value of
97+
bits of the timer delta after running noise sources. Note that a value of
9898
`3.70` is the minimum estimated entropy for true randomness.
9999
```sh
100100
python noniid_main.py -v -u 4 jitter_rng_var.bin 4

rand_jitter/src/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub enum TimerError {
3030
/// Timer is not monotonically increasing.
3131
NotMonotonic = ERROR_BASE + 3,
3232
/// Variations of deltas of time too small.
33-
TinyVariantions = ERROR_BASE + 4,
33+
TinyVariations = ERROR_BASE + 4,
3434
/// Too many stuck results (indicating no added entropy).
3535
TooManyStuck = ERROR_BASE + 5,
3636
#[doc(hidden)]
@@ -43,7 +43,7 @@ impl TimerError {
4343
TimerError::NoTimer => "no timer available",
4444
TimerError::CoarseTimer => "coarse timer",
4545
TimerError::NotMonotonic => "timer not monotonic",
46-
TimerError::TinyVariantions => "time delta variations too small",
46+
TimerError::TinyVariations => "time delta variations too small",
4747
TimerError::TooManyStuck => "too many stuck results",
4848
TimerError::__Nonexhaustive => unreachable!(),
4949
}

rand_jitter/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ where
522522
fn gen_entropy(&mut self) -> u64 {
523523
trace!("JitterRng: collecting entropy");
524524

525-
// Prime `ec.prev_time`, and run the noice sources to make sure the
525+
// Prime `ec.prev_time`, and run the noise sources to make sure the
526526
// first loop round collects the expected entropy.
527527
let mut ec = EcState {
528528
prev_time: (self.timer)(),
@@ -650,7 +650,7 @@ where
650650
// `assert!(delta_sum / TESTLOOPCOUNT >= 1)`
651651
// `assert!(delta_sum >= TESTLOOPCOUNT)`
652652
if delta_sum < TESTLOOPCOUNT {
653-
return Err(TimerError::TinyVariantions);
653+
return Err(TimerError::TinyVariations);
654654
}
655655

656656
// Ensure that we have variations in the time stamp below 100 for at
@@ -673,7 +673,7 @@ where
673673
// available bits of entropy per round here for two reasons:
674674
// 1. Simple estimates of the available bits (like Shannon entropy) are
675675
// too optimistic.
676-
// 2. Unless we want to waste a lot of time during intialization, there
676+
// 2. Unless we want to waste a lot of time during initialization, there
677677
// only a small number of samples are available.
678678
//
679679
// Therefore we use a very simple and conservative estimate:
@@ -703,10 +703,10 @@ where
703703
/// `JitterRng` entropy collector.
704704
///
705705
/// Setting `var_rounds` to `true` will execute the memory access and the
706-
/// CPU jitter noice sources a variable amount of times (just like a real
706+
/// CPU jitter noise sources a variable amount of times (just like a real
707707
/// `JitterRng` round).
708708
///
709-
/// Setting `var_rounds` to `false` will execute the noice sources the
709+
/// Setting `var_rounds` to `false` will execute the noise sources the
710710
/// minimal number of times. This can be used to measure the minimum amount
711711
/// of entropy one round of the entropy collector can collect in the worst
712712
/// case.

rand_jitter/tests/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rand_jitter::JitterRng;
55
fn test_jitter_init() {
66
use rand_core::RngCore;
77

8-
// Because this is a debug build, measurements here are not representive
8+
// Because this is a debug build, measurements here are not representative
99
// of the final release build.
1010
// Don't fail this test if initializing `JitterRng` fails because of a
1111
// bad timer (the timer from the standard library may not have enough

rand_xoshiro/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
//! (which are discarded when generating floats), making it fail linearity
4545
//! tests. This is unlikely to have any impact in practise.
4646
//! - [`SplitMix64`]: Recommended for initializing generators of the xoshiro
47-
//! familiy from a 64-bit seed. Used for implementing `seed_from_u64`.
47+
//! family from a 64-bit seed. Used for implementing `seed_from_u64`.
4848
//!
4949
//! # 32-bit generators
5050
//! - [`Xoshiro128StarStar`]: Recommended for all purposes. Excellent speed.

0 commit comments

Comments
 (0)