Question: import sys from encryption _ utilities import loadPasswordFile, savePasswordFile #The password list - We start with it populated for testing purposes passwords = [ [
import sys
from encryptionutilities import loadPasswordFile, savePasswordFile
#The password list We start with it populated for testing purposes
passwords yahoo"XqffoZeo"google"CoIushujSetu"
#The password file name to store the passwords to
passwordFileName "samplePasswordFile"
#The encryption key for the caesar cypher
encryptionKey
while True:
printWhat would you like to do:
print Open password file"
print Lookup a password"
print Add a password"
print Save password file"
print Print the encrypted password list for testing
print Quit program"
printPlease enter a number
choice input
ifchoice : #Load the password list from a file
passwords loadPasswordFilepasswordFileName
ifchoice : #Lookup at password
printWhich website do you want to lookup the password for?"
for keyvalue in passwords:
printkeyvalue
passwordToLookup input
####### YOUR CODE HERE ######
#You will need to find the password that matches the website
#You will then need to decrypt the password
#
# Create a loop that goes through each item in the password list
# You can consult the reading on lists in Week for ways to loop through a list
#
# Check if the name is found. To index a list of lists you use square backet sets
# So passwords would mean for the first item in the list get it's nd item remember lists start at
# So this would be 'XqffoZeo' in the password list given what is predefined at the top of the page.
# If you created a loop using the syntax described in step then i is your 'iterator' in the list so you
# will want to use i in your first set of brackets.
#
# If the name is found then decrypt it Decrypting is that exact reverse operation from encrypting. Take a look at the
# caesar cypher lecture as a reference. You do not need to write your own decryption function, you can reuse passwordEncrypt
#
# Write the above one step at a time. By this I mean, write step but in your loop print out every item in the list
# for testing purposes. Then write step and print out the password but not decrypted. Then write step This way
# you can test easily along the way.
#
####### YOUR CODE HERE ######
ifchoice :
printWhat website is this password for?"
website input
printWhat is the password?"
unencryptedPassword input
####### YOUR CODE HERE ######
#You will need to encrypt the password and store it in the list of passwords
#The encryption function is already written for you
#Step : You can say encryptedPassword passwordEncryptunencryptedPasswordencryptionKey
#the encryptionKey variable is defined already as don't change this
#Step : create a list of size first item the website name and the second item the password.
#Step : append the list from Step to the password list
####### YOUR CODE HERE ######
ifchoice : #Save the passwords to a file
savePasswordFilepasswordspasswordFileName
ifchoice : #print out the password list
for keyvalue in passwords:
printjoinkeyvalue
ifchoice : #quit our program
sysexit
print
print
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
