ggstd/crypto/rand/mod.rs
1// Copyright 2023 The rust-ggstd authors.
2// Copyright 2009 The Go Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file.
5
6//! Package rand implements a cryptographically secure
7//! random number generator.
8
9mod rand;
10
11pub use rand::{read, Reader};
12
13#[cfg(target_os = "linux")]
14mod rand_getrandom;
15
16#[cfg(target_os = "linux")]
17mod rand_unix;
18#[cfg(target_os = "linux")]
19use rand_unix::read_random;
20
21#[cfg(target_os = "linux")]
22use rand_getrandom::{get_random, get_random_max_read};
23
24#[cfg(target_os = "windows")]
25mod rand_windows;
26
27#[cfg(target_os = "windows")]
28use rand_windows::read_random;
29
30#[cfg(test)]
31mod rand_test;