Skip to main content

secure_random

Function secure_random 

Source
pub fn secure_random(buf: &mut [u8]) -> Result<(), SignerError>
Expand description

Fill a buffer with cryptographically secure random bytes.

By default, delegates to getrandom::getrandom(). In enclave environments where the default OS RNG is unavailable or untrusted, use set_custom_rng() to provide a hardware TRNG source.

ยงErrors

Returns an error if the RNG source fails.