externcrate rand;userand::Rng;pubstructBrorand{}implBrorand{//random generate a specific length's [u8]
pubfnbrorand(len:usize)->Vec<u8>{let u:Vec<u8>=(0..len).map(|_|{let idx:u8=rand::thread_rng().gen();// let _hexs = format!("{:x}", idx);
idx
}).collect::<Vec<u8>>();
u
}}