Skip to main content

Module rng

Module rng 

Source
Expand description

§Random number generation utilities

Random bytes come from the operating system through getrandom, which does not need std. On targets without a supported system source, such as bare-metal thumbv7em-none-eabihf or aarch64-unknown-none, the application must provide a getrandom custom backend.

Functions§

copy_randombytes
Provides random data up to length of data from the OS’s random number generator.
randombytes_bufalloc
Provides random data up to len from the OS’s random number generator.