File tree 4 files changed +12
-11
lines changed
4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const MEMORY_SIZE: usize = MEMORY_BLOCKS * MEMORY_BLOCKSIZE;
32
32
/// This is a true random number generator, as opposed to pseudo-random
33
33
/// generators. Random numbers generated by `JitterRng` can be seen as fresh
34
34
/// entropy. A consequence is that is orders of magnitude slower than `OsRng`
35
- /// and PRNGs (about 10^3 .. 10^6 slower).
35
+ /// and PRNGs (about 10<sup>3</sup>..10<sup>6</sup> slower).
36
36
///
37
37
/// There are very few situations where using this RNG is appropriate. Only very
38
38
/// few applications require true entropy. A normal PRNG can be statistically
@@ -574,8 +574,8 @@ impl JitterRng {
574
574
///
575
575
/// # Example
576
576
///
577
- /// Use `timer_stats` to run the [NIST SP 800-90B Entropy Estimation Suite]
578
- /// ( https://github.com/usnistgov/SP800-90B_EntropyAssessment).
577
+ /// Use `timer_stats` to run the [NIST SP 800-90B Entropy Estimation Suite](
578
+ /// https://github.com/usnistgov/SP800-90B_EntropyAssessment).
579
579
///
580
580
/// This is the recommended way to test the quality of `JitterRng`. It
581
581
/// should be run before using the RNG on untested hardware, after changes
Original file line number Diff line number Diff line change @@ -79,14 +79,14 @@ const RAND_SIZE: usize = 1 << RAND_SIZE_LEN;
79
79
/// 2 * 256 * 4 = 2 kb to hold the state and results.
80
80
///
81
81
/// ## References
82
- /// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number generator*]
83
- /// ( http://burtleburtle.net/bob/rand/isaacafa.html)
82
+ /// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number generator*](
83
+ /// http://burtleburtle.net/bob/rand/isaacafa.html)
84
84
///
85
- /// [2]: Bob Jenkins, [*ISAAC and RC4*]
86
- /// ( http://burtleburtle.net/bob/rand/isaac.html)
85
+ /// [2]: Bob Jenkins, [*ISAAC and RC4*](
86
+ /// http://burtleburtle.net/bob/rand/isaac.html)
87
87
///
88
- /// [3]: Jean-Philippe Aumasson, [*On the pseudo-random generator ISAAC*]
89
- /// ( https://eprint.iacr.org/2006/438)
88
+ /// [3]: Jean-Philippe Aumasson, [*On the pseudo-random generator ISAAC*](
89
+ /// https://eprint.iacr.org/2006/438)
90
90
pub struct IsaacRng {
91
91
rsl : [ u32 ; RAND_SIZE ] ,
92
92
mem : [ w32 ; RAND_SIZE ] ,
Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ const RAND_SIZE: usize = 1 << RAND_SIZE_LEN;
69
69
///
70
70
/// See for more information the description in rand::prng::IsaacRng.
71
71
///
72
- /// [1]: Bob Jenkins, [*ISAAC and RC4*]
73
- /// ( http://burtleburtle.net/bob/rand/isaac.html)
72
+ /// [1]: Bob Jenkins, [*ISAAC and RC4*](
73
+ /// http://burtleburtle.net/bob/rand/isaac.html)
74
74
pub struct Isaac64Rng {
75
75
rsl : [ u64 ; RAND_SIZE ] ,
76
76
mem : [ w64 ; RAND_SIZE ] ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ use super::Rng;
22
22
/// Randomly sample `amount` elements from a finite iterator.
23
23
///
24
24
/// The following can be returned:
25
+ ///
25
26
/// - `Ok`: `Vec` of `amount` non-repeating randomly sampled elements. The order is not random.
26
27
/// - `Err`: `Vec` of all the elements from `iterable` in sequential order. This happens when the
27
28
/// length of `iterable` was less than `amount`. This is considered an error since exactly
You can’t perform that action at this time.
0 commit comments