You are writing a program that encrypts or decrypts messages using a simple substitution cipher. Your...

70.2K

Verified Solution

Question

Programming

You are writing a program that encrypts or decrypts messagesusing a simple substitution cipher. Your program will use twoconstant strings. One will represent the code for encryption: goingfrom the original message (called the plaintext) to the encryptedversion of the message. The other will be“abcdefghijklmnopqrstuvwxyz” (the lowercase alphabet. Your programwill ask the user whether they want to 1) encrypt a message, 2)decrypt a message, or 3) quit. If they choose encrypt or decrypt,you will then get the message from the user and change it to alllower case. Then you will print out the encrypted or decryptedmessage character by character, using the information in the codeto be used for encryption or decryption. The String you will usefor encryption is “csimuylangpwzfrxbvhdtejqko”.

***Java language***

Answer & Explanation Solved by verified expert
4.4 Ratings (888 Votes)
EncryptDecryptjavaimport javautilScannerpublic class EncryptDecrypt public static void mainString args String mesg csimuylangpwzfrxbvhdtejqko String encrypt decrypt line Creating an    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students