Function crypto::utils::rand::gen[][src]

pub unsafe fn gen<T>() -> Result<T>
This is supported on crate feature random only.

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.