pub trait Util {
// Required methods
fn random_string(&self, buf_size: u32) -> Vec<u8>;
fn random_num(&self) -> u32;
}
Expand description
Utility interfaces.
Required Methods§
Sourcefn random_string(&self, buf_size: u32) -> Vec<u8>
fn random_string(&self, buf_size: u32) -> Vec<u8>
Generate random string using the UnQLite PRNG.
It will generate a english alphabet based string of length buf_size (last argument).
Sourcefn random_num(&self) -> u32
fn random_num(&self) -> u32
Generate random number using the UnQLite PRNG.
It will return a 32-bit unsigned integer between 0 and 0xFFFFFFFF.