Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need to write a program that will take a text, encrypt it and then decrypt it as well using random feature and a seed(123).
I need to write a program that will take a text, encrypt it and then decrypt it as well using random feature and a seed(123). below is the spec:
The first program you will write shall be named mixer.py. The job of this program will be to encrypt ("mix" or "jumble") the lines of a text file, but do it in such a way that it can be un-done later with a separate program (which you will also write) When run, your program will first request a file to encrypt. Requesting the file name will look like: Enter a name of a python program to mix: X This program will then run it's encrypting (mixing) algorithm on the text file . It will save the mixed version of the program to a file named encrypted.txt At this point you might be asking, how does the mixing work? And how can I mix in such a way that it can be undone by another program? Your program will "mix" an input file by randomly re- arranging the lines of the input file. For example, you might request that mixer.py encrypt a python file named get-cred entials.py that looks like this #get the username from a prompt username = raw input ("Login: >> #list of allowed users user1 = "Jack" user2 -"Jil1" #control that the user belongs to the list of allowed if username == user1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started