Generate password

    0

    0

    Giovanny Gongora

    Codiga's Rust Recipes

    From alphanumeric characters

    use rand::{thread_rng, Rng};
    use rand::distributions::Alphanumeric;
    
    fn main() {
      let rand_string: String = thread_rng()
        .sample_iter(&Alphanumeric)
        .take(30)
        .map(char::from)
        .collect();
      println!("{}", rand_string);
    }
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.