Skip to content

FBW32/06-Browser-PasswordGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password Generator

Description:

  • This app generates passwords.

  • There should be a Generate Password button which the user can click to show a new password using all letters and different characters.

  • By default, the password generated should use mixed cases (both lowercase and uppercase).

Create a password generator WebApp with the following instructions:

  1. Use the constant "charset" in your function (move it there). It contains all characters to use.
const charset = 'abcdefghijklmnopqrstuvwxyz0123456789!§$%&/()=?#,;.:-_';
  1. Your function should have 2 arguments:

    • length (Number) The length of the password
    • mixedCase (Boolean) Whether or not to use mixed cases (lowercase + uppercase)
  2. If the second argument is true, use uppercase for every third character.

  3. Use the function getRandomInt() to generate random numbers where you need them.

  4. Register an onClick event for the button to generate a new password.

  5. Update the generated password inside of the "output" element.

  6. Generate the first password as soon as the page is loaded, using a default length of 20.

Examples for generated passwords: - 876FocMkcCv98teXc(Ov - %lfXcrLt-#ke3r6R5§-? - Nd1Z$yRx

Bonus version:

  1. Add an input field to define the length of the password.

  2. Add a checkbox to define if the password should use mixed cases.

  3. Generate a new password on change of the input elements.

  4. Optional: Free free to use Bootstrap for styling.

Hint: Refer to the representation below, for an idea of what your result should look like.

demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published