// (c) 2020-2022 ZeroTier, Inc. -- currently propritery pending actual release and licensing. See LICENSE.md. // from zeronsd pub fn randstring(len: u8) -> String { (0..len) .map(|_| (rand::random::() % 26) + 'a' as u8) .map(|c| { if rand::random::() { (c as char).to_ascii_uppercase() } else { c as char } }) .map(|c| c.to_string()) .collect::>() .join("") }