Skip to content

Commit c02bc9e

Browse files
committed
std: clarify the strength of DefaultRandomSource
1 parent 9330588 commit c02bc9e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

library/std/src/random.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ use crate::sys::random as sys;
1010

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

0 commit comments

Comments
 (0)