We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c873c21 commit 9397fe0Copy full SHA for 9397fe0
src/libstd/rand.rs
@@ -619,6 +619,16 @@ pub fn rng() -> IsaacRng {
619
IsaacRng::new()
620
}
621
622
+/// Create a weak random number generator with a default algorithm and seed.
623
+///
624
+/// It returns the fatest `Rng` algorithm currently available in Rust without
625
+/// consideration for cryptography or security. If you require a specifically
626
+/// seeded `Rng` for consistency over time you should pick one algorithm and
627
+/// create the `Rng` yourself.
628
+pub fn weak_rng() -> XorShiftRng {
629
+ XorShiftRng::new()
630
+}
631
+
632
static RAND_SIZE_LEN: u32 = 8;
633
static RAND_SIZE: u32 = 1 << RAND_SIZE_LEN;
634
0 commit comments