Vulnerabilities | |||||
---|---|---|---|---|---|
Version | Suggest | Low | Medium | High | Critical |
0.1.18 | 0 | 0 | 0 | 0 | 0 |
0.1.17 | 0 | 0 | 0 | 0 | 0 |
0.1.16 | 0 | 0 | 0 | 0 | 0 |
0.1.15 | 0 | 0 | 0 | 0 | 0 |
0.1.14 | 0 | 0 | 0 | 0 | 0 |
0.1.13 | 0 | 0 | 0 | 0 | 0 |
0.1.12 | 0 | 0 | 0 | 0 | 0 |
0.1.11 | 0 | 0 | 0 | 0 | 0 |
0.1.10 | 0 | 0 | 0 | 0 | 0 |
0.1.9 | 0 | 0 | 0 | 0 | 0 |
0.1.8 | 0 | 0 | 0 | 0 | 0 |
0.1.7 | 0 | 0 | 0 | 0 | 0 |
0.1.6 | 0 | 0 | 0 | 0 | 0 |
0.1.5 | 0 | 0 | 0 | 0 | 0 |
0.1.4 | 0 | 0 | 0 | 0 | 0 |
0.1.3 | 0 | 0 | 0 | 0 | 0 |
0.1.2 | 0 | 0 | 0 | 0 | 0 |
0.1.1 | 0 | 0 | 0 | 0 | 0 |
0.1.0 | 0 | 0 | 0 | 0 | 0 |
0.1.18 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
Apache-2.0 - Apache License 2.0This crate provides compile time random number generation. This allows you to insert random constants into your code that will be auto-generated at compile time.
A new value will be generated every time the file is rebuilt. This obviously makes the resulting binary or lib non-deterministic. (See below)
use const_random::const_random ;
const MY_RANDOM_NUMBER: u32 = const_random!(u32);
This works exactly as through you have called: OsRng.gen::<u32>()
at compile time.
So for details of the random number generation, see the rand
crates documentation.
The following types are supported: u8, i8, u16, i16, u32, i32, u64, i64, u128, i128, usize, isize and [u8; N].
Sometimes it is an advantage for build systems to be deterministic. To support this const-random
reads the environmental
variable CONST_RANDOM_SEED
. If this variable is set, it will be used as the seed for the random number generation.
Setting the same seed on a build of the same code should result in identical output.