Function spinoso_random::new_seed

source ·
pub fn new_seed() -> Result<[u32; 4], NewSeedError>
Expand description

Read a new Random seed, using platform-provided randomness.


use spinoso_random::{Error, Random};

let seed = spinoso_random::new_seed()?;


If the randomness feature provided by the platform is not present or failed to completely generate a seed, an error is returned. This error should be raised as a Ruby RuntimeError.