Skip to content

Commit

Permalink
Merge pull request #2 from Mohuva13/Develop
Browse files Browse the repository at this point in the history
Merge Develop to master
Add input int argument for password_lenght directly of input from the user.
  • Loading branch information
Mohuva13 authored Aug 1, 2023
2 parents 9668a35 + 9456c1a commit cd677a2
Show file tree
Hide file tree
Showing 1,117 changed files with 16 additions and 108,081 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea/
.idea/
target/
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

17 changes: 14 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use generator::password_generator::gen_by_len as gen_by_len;
use copypasta::ClipboardContext;
use copypasta::ClipboardProvider;
use std::env;



Expand All @@ -11,11 +12,21 @@ mod generator;
fn main() {
// 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!");


// Integer Arguments = password_length or input password_length
let args: Vec<String> = env::args().collect();
if args.len() > 1 {
password_length = args[1].clone();
}
else {
println!("Input password length: ");
std::io::stdin().read_line(&mut password_length).expect("Failed to read line");
}

// Convert values of password_length to i32
let password_length: i32 = password_length.trim().parse().expect("Please type a number!");

// Password_string
// Generate password
let password_string = String::from(gen_by_len(password_length));
Expand Down
1 change: 0 additions & 1 deletion target/.rustc_info.json

This file was deleted.

3 changes: 0 additions & 3 deletions target/CACHEDIR.TAG

This file was deleted.

Empty file removed target/debug/.cargo-lock
Empty file.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

1 change: 0 additions & 1 deletion target/debug/.fingerprint/dlib-47ea5380e39be9a0/lib-dlib

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion target/debug/.fingerprint/dlib-69d96506c5b5be3a/lib-dlib

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

1 change: 0 additions & 1 deletion target/debug/.fingerprint/libc-41419d257afa2c5f/lib-libc

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion target/debug/.fingerprint/libc-8b6f2fc2fa00da18/lib-libc

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion target/debug/.fingerprint/log-00bf8177b3921886/lib-log

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

1 change: 0 additions & 1 deletion target/debug/.fingerprint/log-b88fed8af967d155/lib-log

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cd677a2

Please sign in to comment.