So I wrote a script that inputs a line of plaintext and a distance value and outputs an encrypted text using a Caesar cipher. The script should work for any printable characters:
plainText = input("Enter a message: ")
distance = int(input("Enter the distance value: "))
code = ""
for ch in plainText:
ordValue = ord(ch)
cipherValue = ordValue + distance
if cipherValue > 127:
cipherValue = distance - (127 - ordValue + 1)
code += chr(cipherValue)
print(code)
Now I need to Draw a structure chart for the scirpt. The program should include at least two function definitions other than the main function. How do I do this?
Screenshot

Program
#Method to get inputs and return plain text and distance
value
def getInput():
plainText = input("Enter a message: ")
distance = int(input("Enter the distance value:
"))
return plainText,distance
#Method to convert the plain text into cipher
def convertCipher(plainText,distance):
code = ""
for ch in plainText:
ordValue = ord(ch)
cipherValue = ordValue +
distance
if cipherValue >
127:
cipherValue = distance - (127 - ordValue + 1)
code +=
chr(cipherValue)
return code
#Method to run the program
def main():
plainText,distance=getInput()
code=convertCipher(plainText,distance)
print(code)
main()
Output
Enter a message: Good Morining
Enter the distance value: 4
Kssh$Qsvmrmrk
Draw a structure chart

So I wrote a script that inputs a line of plaintext and a distance value and...
Write a script that inputs a line of encrypted text and a distance value and outputs plaintext using a Caesar cipher. The script should work for any printable characters. An example of the program input and output is shown below: Enter the coded text: Lipps${svph% Enter the distance value: 4 Hello world! # Request the inputs codedText = input("Enter the coded text: ") distanceValue = int(input("Enter the distance value: ")) # Calculate the decryption plainText = "" for cr in...
Write a script in python that inputs a line of plaintext and a distance value and outputs an encrypted text using a Caesar cipher. The script should work for any printable characters.
Using Python; Caesar part of the homework: Write c_encrypt() and c_decrypt(), both of which take two arguments, the first one a string and the second one an integer key. Both should return a string. Vigenère part of the homework: Write vig_encrypt() and vig_decrypt() functions. Each takes two strings as inputs, with the first being the plaintext/ciphertext, and the second being the key. Both should be calling functions you wrote earlier to help make the work easier. The key will be...
Please can I have a UML Class diagram for the Python program below: def main(): print() print("Welcome to Caesar Encryption and Viginere Decryption Cipher") print() print("Please select an option") option = "c" while option == "c": hello = input('Choose Caesar Cipher encrypt 1:\n' 'Choose Viginere Cipher Decrypt 2:\n') message = input('Enter a message: ') password = input('Enter a password: ') if hello == '1': viginere_cipher(message, password) elif hello == '2': viginere_cipher_decrypt(message, password) print() print("Choose an option") option = input('Enter c...
Change the following Shift Cipher program so that it uses OOP(constructor, ect.) import java.util.*; import java.lang.*; /** * * @author STEP */ public class ShiftCipher { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Scanner input = new Scanner(System.in); String plainText; System.out.print("Please enter your string: "); // get message plainText = input.nextLine(); System.out.print("Please enter your shift cipher key: "); // get s int s = input.nextInt(); int...
Computer Science C++ Help, here's the question that needs to be answered (TASK D): Task D. Decryption Implement two decryption functions corresponding to the above ciphers. When decrypting ciphertext, ensure that the produced decrypted string is equal to the original plaintext: decryptCaesar(ciphertext, rshift) == plaintext decryptVigenere(ciphertext, keyword) == plaintext Write a program decryption.cpp that uses the above functions to demonstrate encryption and decryption for both ciphers. It should first ask the user to input plaintext, then ask for a right...
Modify the scripts of Projects
1 and 2 to encrypt and decrypt entire files of text. An example of
the program interface is shown below:
both images are from one question. I need it in python,
please.
MINDTAP From Cengage Programming Exercise 4.3 decrypt.pyencrypt.py Instructions 1Modify the progran below Modify the scripts of Projects 1 and 2 to encrypt and decrypt entire files of text. 4 Probject 4.1 5 6 Encypts an input string of the ASCII characters and prints...
C Program In this assignment you'll write a program that encrypts the alphabetic letters in a file using the Vigenère cipher. Your program will take two command line parameters containing the names of the file storing the encryption key and the file to be encrypted. The program must generate output to the console (terminal) screen as specified below. Command Line Parameters Your program must compile and run from the command line. The program executable must be named “vigenere” (all lower...
I need Help to Write a function in C that will Decrypt at least
one word with a substitution cipher given cipher text and key
My Current Code is:
void SubDecrypt(char *message, char *encryptKey) {
int iteration;
int iteration_Num_Two = 0;
int letter;
printf("Enter Encryption Key: \n");
//Display the message to enter encryption
key
scanf("%s", encryptKey);
//Input
the Encryption key
for (iteration = 0; message[iteration] != '0';
iteration++)
//loop will continue till
message reaches to end
{
letter = message[iteration];
...
Cryptography, the study of secret writing, has been around for a very long time, from simplistic techniques to sophisticated mathematical techniques. No matter what the form however, there are some underlying things that must be done – encrypt the message and decrypt the encoded message. One of the earliest and simplest methods ever used to encrypt and decrypt messages is called the Caesar cipher method, used by Julius Caesar during the Gallic war. According to this method, letters of the...