Fix documentation differences

This commit is contained in:
Paul Dicker 2018-01-08 19:58:00 +01:00
parent 301825eab0
commit c6cd88ad1c
4 changed files with 12 additions and 11 deletions

View File

@ -32,7 +32,7 @@ const MEMORY_SIZE: usize = MEMORY_BLOCKS * MEMORY_BLOCKSIZE;
/// This is a true random number generator, as opposed to pseudo-random
/// generators. Random numbers generated by `JitterRng` can be seen as fresh
/// entropy. A consequence is that is orders of magnitude slower than `OsRng`
/// and PRNGs (about 10^3 .. 10^6 slower).
/// and PRNGs (about 10<sup>3</sup>..10<sup>6</sup> slower).
///
/// There are very few situations where using this RNG is appropriate. Only very
/// few applications require true entropy. A normal PRNG can be statistically
@ -574,8 +574,8 @@ impl JitterRng {
///
/// # Example
///
/// Use `timer_stats` to run the [NIST SP 800-90B Entropy Estimation Suite]
/// (https://github.com/usnistgov/SP800-90B_EntropyAssessment).
/// Use `timer_stats` to run the [NIST SP 800-90B Entropy Estimation Suite](
/// https://github.com/usnistgov/SP800-90B_EntropyAssessment).
///
/// This is the recommended way to test the quality of `JitterRng`. It
/// should be run before using the RNG on untested hardware, after changes

View File

@ -79,14 +79,14 @@ const RAND_SIZE: usize = 1 << RAND_SIZE_LEN;
/// 2 * 256 * 4 = 2 kb to hold the state and results.
///
/// ## References
/// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number generator*]
/// (http://burtleburtle.net/bob/rand/isaacafa.html)
/// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number generator*](
/// http://burtleburtle.net/bob/rand/isaacafa.html)
///
/// [2]: Bob Jenkins, [*ISAAC and RC4*]
/// (http://burtleburtle.net/bob/rand/isaac.html)
/// [2]: Bob Jenkins, [*ISAAC and RC4*](
/// http://burtleburtle.net/bob/rand/isaac.html)
///
/// [3]: Jean-Philippe Aumasson, [*On the pseudo-random generator ISAAC*]
/// (https://eprint.iacr.org/2006/438)
/// [3]: Jean-Philippe Aumasson, [*On the pseudo-random generator ISAAC*](
/// https://eprint.iacr.org/2006/438)
pub struct IsaacRng {
rsl: [u32; RAND_SIZE],
mem: [w32; RAND_SIZE],

View File

@ -69,8 +69,8 @@ const RAND_SIZE: usize = 1 << RAND_SIZE_LEN;
///
/// See for more information the description in rand::prng::IsaacRng.
///
/// [1]: Bob Jenkins, [*ISAAC and RC4*]
/// (http://burtleburtle.net/bob/rand/isaac.html)
/// [1]: Bob Jenkins, [*ISAAC and RC4*](
/// http://burtleburtle.net/bob/rand/isaac.html)
pub struct Isaac64Rng {
rsl: [u64; RAND_SIZE],
mem: [w64; RAND_SIZE],

View File

@ -22,6 +22,7 @@ use super::Rng;
/// Randomly sample `amount` elements from a finite iterator.
///
/// The following can be returned:
///
/// - `Ok`: `Vec` of `amount` non-repeating randomly sampled elements. The order is not random.
/// - `Err`: `Vec` of all the elements from `iterable` in sequential order. This happens when the
/// length of `iterable` was less than `amount`. This is considered an error since exactly