Skip to content

Commit

Permalink
Fix old doc reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Aschmann committed Jan 11, 2024
1 parent 057fa91 commit 4af86fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/prng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//! by seeding them with data obtained from the [`crate::hwrng`] module.
//!
//! At the moment two prngs are available: [`rand::rngs::StdRng`] and [`crate::random::Random`].
//! Both of these claim to be cryptographic secure prngs. Provided of course the seeds from `hwrng`
//! are secure to begin with, which drastically depends on the board used, see remarks in [`crate::hwrng`] module!

//! Both of these claim to be cryptographic secure prngs. Provided the seeds from RIOTs HWRNG that are used
//! provide enough entropy to begin with, which drastically depends on the board used,
//! see remarks in [RIOTs documentation](https://doc.riot-os.org/group__drivers__periph__hwrng.html).

use embedded_hal::prelude::_embedded_hal_blocking_rng_Read;
use rand::{rngs::StdRng, SeedableRng};
Expand All @@ -14,7 +14,7 @@ use crate::{
random::{Random, RandomSeed},
};

/// Seeds a [`crate::random::Random`] prng with a 32bit seed generated by [`crate::hwrng::HWRNG`].
/// Seeds a [`crate::random::Random`] prng with a 32 byte seed generated by RIOTs HWRNG.
///
/// See this modules description regarding quality of the used seeds.
///
Expand All @@ -27,7 +27,7 @@ pub fn riot_prng() -> Random<32> {
Random::<32>::from_seed(RandomSeed::new_from_hwrng())
}

/// Seeds a [`rand::rngs::StdRng`] prng with a 32bit seed generated by [`crate::hwrng::HWRNG`].
/// Seeds a [`rand::rngs::StdRng`] prng with a 32 byte seed generated by RIOTs HWRNG.
///
/// See this modules description regarding quality of the used seeds.
pub fn rand_prng() -> StdRng {
Expand Down

0 comments on commit 4af86fd

Please sign in to comment.