Skip to content

Commit

Permalink
std: clarify the strength of DefaultRandomSource
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Aug 21, 2024
1 parent 6353121 commit 6b40cf5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions library/std/src/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ use crate::sys::random as sys;

/// The default random source.
///
/// This asks the system for the best random data it can provide, meaning the
/// resulting bytes *should* be usable for cryptographic purposes. Check your
/// platform's documentation for the specific guarantees it provides. The high
/// quality of randomness provided by this source means it is quite slow. If
/// you need a larger quantity of random numbers, consider using another random
/// number generator (potentially seeded from this one).
/// This asks the system for random data suitable for cryptographic purposes
/// such as key generation. If security is a concern, consult the platform
/// documentation below for the specific guarantees your target provides.
///
/// The high quality of randomness provided by this source means it can be quite
/// slow. If you need a large quantity of random numbers and security is not a
/// concern, consider using an alternative random number generator (potentially
/// seeded from this one).
///
/// # Underlying sources
///
Expand Down

0 comments on commit 6b40cf5

Please sign in to comment.