Skip to content

Generate a password depending on the user specifications

Notifications You must be signed in to change notification settings

janimuhlestein/passwordGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

passwordGenerator

Generate a password depending on the user specifications

  1. On click, run a writePassword() function that will get user input on the length of the password desired, and whether they wish to use upper case, lower case, numeric and special characters.

  2. Verify that they do not enter a non-integer.

  3. Verify that they only enter a length between 8 and 128 chars.

  4. Verify that they make at least one option choice.

  5. Once all options are set, generate password.

  6. Display new password in textarea on screen.

  7. Decided to add a reset function to reset object so that they can generate many different passwords with different options as desired. As it was, the when you clicked on the button again, it just generated a new password from the same options. Asked the user if they wanted to change options! If so, it recurses through the function again.

Methods:

  1. Create a settings object to hold all settings.
  2. Create strings with appropriate characters.
  3. Create an array of options to choose from (i.e., upper, lower, etc.).
  4. Use Math.floor() and Math.random() to a) select an option, and b) select a random character from the option list.
  5. Add the random character to the password.
  6. Iterate through a loop to get as many random characters as needed.
  7. Use event listener to check for click events.
  8. Use getElementById to get the text area and write the new password.

To see original requirements, look at the readme.md in the assets/requirements folder.

About

Generate a password depending on the user specifications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published