Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password Generator #349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ShivamPande18
Copy link

Description

Python code for a simple CLI password generator in which you enter the length of the password you'd like to generate (Minimum 8) and it creates a strong random password containing symbols, capital letters, regular letters, and numbers.

Technologies and Languages

Python

@ghost
Copy link

ghost commented Oct 14, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

Copy link
Owner

@bislara bislara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done @ShivamPande18
Please check the review comments once and modify if required.

VALID_CHARS = DIGITS+UPPER_CASE+LOWER_CASE+SYMBOLS

#Adding atleast 1 character of all types of valid characters
password_temp = random.choice(DIGITS)+ random.choice(UPPER_CASE)+ random.choice(LOWER_CASE)+ random.choice(SYMBOLS)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So everytime the pwd will have digit, upper_case,lower_case_symbols in the beginning in the same order. Can you modify this to have it in random sequence.

#Adding atleast 1 character of all types of valid characters
password_temp = random.choice(DIGITS)+ random.choice(UPPER_CASE)+ random.choice(LOWER_CASE)+ random.choice(SYMBOLS)

if(length<8):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you have added only 4 chars in the top, the if condition will always be false right?
So, what is the use of that if condition?

@ShivamPande18
Copy link
Author

ShivamPande18 commented Oct 21, 2022

Hi @bislara would you please merge my PR or tell me if you need any more modifications or clarifications?

@bislara
Copy link
Owner

bislara commented Oct 22, 2022

hey @ShivamPande18 , I have already reviewed the PR. Please check the comments and make the changes if required.

image

@bislara bislara linked an issue Oct 22, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Password Generator
2 participants