GithubHelp home page GithubHelp logo

password-generator's Introduction

Password-Generator

This application generates a random password to the user based on criteria provided through the use of prompts. Once the use clicks the "Generate a Password" button, the prompts are displayed in the following sequence:

  1. Enter the password length. Must be a minimum of 8 characters and a maximum of 128 characters.
  2. Do you want your password to contain special characters? Enter either 'y' for yes or 'n' for no.
  3. Do you want your password to contain numbers? Enter either 'y' for yes or 'n' for no.
  4. Do you want your password to contain uppercase letters? Enter either 'y' for yes or 'n' for no.
  5. Do you want your password to contain lowercase letters? Enter either 'y' for yes or 'n' for no.

If the user does not provide the input criteria asked for, an error alert is displayed. Once the user clicks the Ok button, the same prompt question is asked again until either a valid response is entered, or the cancel button is pressed in which case a value of null is returned and the textbox is cleared (if there was any data already there from a previous password generated.)

If the user answers 'n' (no) to all of the 4 criteria asked, an error alert is displayed that says: "You must have at least one of the criteria that was previously asked for." In which case, the textbox will clear, and the copy button will be removed (if it was there previously) and the user will have to answer all of the questions again after pressing the "Generate Password" button.

When all questions are answered with valid criteria, a newly generated password is displayed in the textbox above along with "Copy" button which is displayed above the "Generate Password" button. When this button is clicked, the password text is copied to the user's clipboard and they can now paste it inside another application. This button is removed and the textbox is cleared when the cancel button is pressed in a proceeding sequence, or the browser is refreshed.

password-generator's People

Contributors

nicholas-romano avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.