Skip to content

Morgan1317/Generate-Random-Passcode-C3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Generate-Random-Passcode-C3

Generate a Random Password

PURPOSE

Take a starter code and make it so that when the button 'generate password' is clicked, a random password is generated with constraints that the user input, such as length, and what types of characters are utilized.

Summary

I first made functions that would work to determine the length of the password based on user input.

Screen Capture of Generate Random Password Functions

I continued to make functions that would work to randomize whatever characters the user chooses to implement in the password.

password function screencapture

In the function, it works by prompting the user for the length and characters wanted in the password. An array is initialized for the password, and a while loop runs until the length of the password it met. If the user wants to use a specific type of character, if statements work to implement that function specified for the type of character, and push them into the array. Once the length is met, the while loop stops, and the array of random characters is shuffled again utilizing the fisher yates method of shuffle. This randomized order of the array is output into a string, and the function stops by returning this string.

screen capture write password function

This string is then used in the given function writePassword, and upon clicking the generate password button is displayed in the box on the screen for the user to utilize.

SCREEN CAPTURE OF WEBPAGE

The image below shows the working interface if the user chose 34 characters, and all character types.

Screencapture working code interface

LINK TO DEPLOYED APPLICATION

https://morgan1317.github.io/Generate-Random-Passcode-C3/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published