Skip to main content

random_bytes

Function random_bytes 

Source
pub fn random_bytes(len: u32) -> Vec<u8> 
Expand description

Returns len pseudorandom bytes. WARNING: Entropy is provided by the transaction itself to ensure deterministic execution. This is not suitable for cryptographic purposes. NOTE: you cannot use the rand crate in templates, because get_random is not available for wasm32-unknown-unknown target.