Skip to content

Create and store usernames and passwords. Passwords are hashed.

Notifications You must be signed in to change notification settings

christian-ocampo/password_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

password_manager

Create and store usernames and passwords. Passwords are hashed.

The program begins by prompting the user to create a new account or login into an existing account. Choosing to login into an existing account prompts the user to enter their username and password. After doing so, the program compares this info to a dictionary containing all usernames and passwords. If the username is found inside the dictionary, then the program prompts the user for the passwords, which leads to the password being passed onto a hashing function to compare it to the passwords inside the dictionary. Once the program determines that the password is correct and does belong to the username inputted, the program prints a statement that the login attempt was successful and asks the user if they would like to return to the login menu.

If the user chooses to create a new account, the program instructs them to create a username and password. A list of password requirements is shown and is used to verify if the user has met all requirements. The program also checks to see if the username the user has entered has already been taken. Once a username and password are selected, the password is run through the hashing function to hash and store the password alongside its username in a dictionary containing all usernames and passwords.

Hashing in this program is done by first passing the inputted password onto the password_alg function. An empty string is assigned to the ascii_pass variable to use in a for loop. This for loop goes through each character in the user's password and converts them to its Unicode code point as well as converting the result into a string to concatenate it into ascii_pass. After the loop finishes, the original password is deleted and ascii_pass is used as a seed to initialize the random number generator. Once initialized, an empty string is assigned to a variable called safe_pass which will later be the hashed password that will be added to the dictionary containing all usernames and passwords. a second for loop is created to go through each character in ascii_pass. For each character, a random printable character is chosen and added onto safe_pass. Once the loop finishes, ascii_pass is deleted and safe_pass is returned.

About

Create and store usernames and passwords. Passwords are hashed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages