Skip to content

An application that a user can use to generate a random password based on criteria they’ve selected. Features dynamically updated HTML and CSS using Javascript. Application is fully responsive to all small and wide views.

License

Notifications You must be signed in to change notification settings

FAC-73/password-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

password-generator

An application that a user can use to generate a random password based on criteria they’ve selected. Features dynamically updated HTML and CSS using Javascript. Application is fully responsive to small and wide views.

Website screenshot

Table of Contents

  1. View project
  2. About The Project
  3. Getting Started
  4. Usage
  5. Contributing
  6. License
  7. Contact

About The Project

Password Generator Screenshot

Built using Javascript, HTML and CSS. The password generator is an application where a user can generate a secure, random password - between 8 - 128 characters, and providing options to include numbers, special characters as well as upper and lowercase letters.

Built With

Getting Started

To get a local copy up and running follow these simple steps. You can also download the source files provided. You will need a text editor such as Visual Studio Code, Xcode or similar to edit the source code.

Installation

  1. Clone the repo

    git clone https://github.com/FAC-73/password-generator.git
  2. Pull the latest

    git pull

Usage

Password generator

What's included

  1. HTML, CSS and Javascript files include the source code for running the password generator application
  2. This project demonstrates ways in which javavscript cane be used to manipulate the DOM elements in the browser window and dynamically updating HTML.

Project deliverables

Included functionality

The generate button is used to trigger the series of prompts requiring the user to provide parameters for their password as follows:

  1. Provide a value between 8 - 128 for your password string length. If the user inputs an invalid value they'll go into a loop until a valid value is input.

Password Generator prompt

Password Generator prompt invalid

  1. If the user wishes to exit the dialog after invoking the action they can do so using the cancel action and returned back to the main view.

Cancel action

  1. Once they have provided a valid string length value, sequential confirmation dialogs include additional paramenters for generating the password. Each parameter is optional. Parameters include options for numbers, special characters, upper and lowercase letters.

Password Generator confirm password parameters

  1. If the user does not confirm at least one parameter from the four options the user is looped and an alert is shown asking them to choose at least one parameter.

Include at least one parameter

  1. Once the user chooses a parameter the selections are stored as a variable and concatenated with the array of letters, numbers and characters determined by the user in the confirm dialogs.

  2. A password is then randomly generated using a for loop using the values stored in the passwordCreate variable and the the math.random function. The stringLength variable provides the length of the password to be generated as specified by the user.

  3. Once the password is successfully created and populated into the textarea HTML element using a function.

Generate password

  1. The password can be copied to clipboard using the 'copy to clipboard' action. This uses an eventListener for the button click, and and execCommand to copy the string, once copied the text changes to green using setAtrribute.

Copy password

Copy password confirm

HTML, CSS and Javascript

  1. Index.html - Contains basic layout structure using a custom div element named 'card' to display main content. Semantic html is used for elements such as buttons and textarea
  2. styles.css - Contains layout, styling and media-queries for html content
  3. script.js - Contains Variables and variable arrays for numbers, special characters, uppercase and lowercase letters. Two event listeners, loops using while statement for invalid prompt and confirmation inputs, for loop for generating password. Function for generating and writing password to HTML. Function for copying random password to clipboard and manipulating password styles in html text area.

RESPONSIVE VIEW - MOBILE

Responsive layout

Pushing to GitHub

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/FeatureName)
  3. Commit your Changes (git commit -m 'Add some FeatureName)
  4. Push to the Branch (git push origin feature/FeatureName)
  5. Open a Pull Request

License

Distributed under the MIT License.

See LICENSE for more information.

Contact

Kay Davis

Project repo link: [https://fac-73.github.io/password-generator/](https://fac-73.github.io/password-generator/
Project website: https://github.com/FAC-73/password-generator/

About

An application that a user can use to generate a random password based on criteria they’ve selected. Features dynamically updated HTML and CSS using Javascript. Application is fully responsive to all small and wide views.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published