Module random

Module random 

Source
Expand description

Support for random number generation

Structs§

RandomDet
A generator for deterministic random bytes

Constants§

DETERMINISTIC_SEED_LENGTH
The expected length of a seed for fill_random_deterministic

Traits§

KeyMaterial
A trait for generating raw key material, generally cryptographically random bytes
Rng
Combined trait for CryptoRng and RngCore

Functions§

default_rnggetrandom
Obtain an instance of the default random number generator
fill_randomgetrandom
Fill a mutable slice with random data using the system random number generator.
fill_random_deterministic
Written to be compatible with randombytes_deterministic in libsodium, used to generate a deterministic symmetric encryption key
random_secretalloc
Create a new SecretBytes instance with random data.