product_os_random

Trait RandomGeneratorTemplate

Source
pub trait RandomGeneratorTemplate {
    // Required methods
    fn get_random_bytes(&mut self, len: usize) -> Vec<u8>;
    fn get_random_usize(&mut self, min: usize, max: usize) -> usize;
    fn get_random_u32(&mut self) -> u32;
    fn get_random_u64(&mut self) -> u64;
    fn get_random_string(&mut self, len: usize) -> String;
    fn get_random_from_characters(
        &mut self,
        len: usize,
        characters: &str,
    ) -> String;
    fn get_random_alphanumeric(&mut self, len: usize) -> String;
    fn generate_key(&mut self, len: usize) -> Vec<u8>;
}

Required Methods§

Source

fn get_random_bytes(&mut self, len: usize) -> Vec<u8>

Source

fn get_random_usize(&mut self, min: usize, max: usize) -> usize

Source

fn get_random_u32(&mut self) -> u32

Source

fn get_random_u64(&mut self) -> u64

Source

fn get_random_string(&mut self, len: usize) -> String

Source

fn get_random_from_characters(&mut self, len: usize, characters: &str) -> String

Source

fn get_random_alphanumeric(&mut self, len: usize) -> String

Source

fn generate_key(&mut self, len: usize) -> Vec<u8>

Implementors§