Function crypto::utils::rand::gen

source ·
pub unsafe fn gen<T: Sized + Copy>() -> Result<T>
Expand description

Generate a cryptographically strong random value of a Sized type T

Safety

This function fills the memory of the returned type with random values, there are no guarantees that the type’s invariants hold and so may lead to undefined behavior if used inappropriately.