Module askar_crypto::random[][src]

Expand description

Support for random number generation

Constants

DETERMINISTIC_SEED_LENGTH

The expected length of a seed for fill_random_deterministic

Traits

Rng

Combined trait for CryptoRng and RngCore

Functions

fill_random

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.

with_rng

Perform an operation with a reference to the random number generator