Skip to main content

random_bytes

Function random_bytes 

Source
pub fn random_bytes(length: usize) -> Vec<u8> ⓘ
Expand description

PHP random_bytes($length): bytes from the operating system’s CSPRNG.

§Panics

When the operating system cannot provide random bytes, where PHP throws its Exception (“Could not gather sufficient random data”).