Function sequoia_openpgp::crypto::random

source ·
pub fn random<B: AsMut<[u8]>>(buf: B)
Expand description

Fills the given buffer with random data.

Fills the given buffer with random data produced by a cryptographically secure pseudorandom number generator (CSPRNG). The output may be used as session keys or to derive long-term cryptographic keys from. However, to create session keys, consider using SessionKey::new.