Skip to content

Commit

Permalink
Input len and generate password
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohuva13 committed Jul 25, 2023
1 parent 1b39218 commit a5b55a3
Show file tree
Hide file tree
Showing 53 changed files with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,14 @@ use generator::password_generator::gen_by_len as gen_by_len;
mod generator;

fn main() {
println!("{}", gen_by_len(10));
// input password length
let mut password_length = String::new();
println!("Input password length: ");
std::io::stdin().read_line(&mut password_length).expect("Failed to read line");
let password_length: i32 = password_length.trim().parse().expect("Please type a number!");

// generate password
println!("\n");
println!("Generated password:");
println!("{}", gen_by_len(password_length));
}
Binary file modified target/debug/Fast_Password_Generator
Binary file not shown.
Binary file modified target/debug/deps/Fast_Password_Generator-f97fd60aef5fa1b9
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit a5b55a3

Please sign in to comment.