Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write another method to decrypt the ciphertext into plain text. Hints Helpful skills and knowledge required to complete the practical problem are not limited to
Write another method to decrypt the ciphertext into plain text.
Hints
Helpful skills and knowledge required to complete the practical problem are not limited
to the followings:
D array
Conditional ifelseor switch
Iteration loop foror whileor dowhile
Critical thinking and problem solving skills
Submission requirements
Copy the source code into Word file.
Also zip your source code for submission to OAS.
All codes to be accompanied with proper comments, where necessary.
Provide screen shots and description of your inputs and outputs eg tests using
different texts for:
Encryption method
Decryption methodProgramming Practical
Suppose that you wish to setup a secure communication between you and your secret
team members. A simple encryption algorithm that generates ciphertext, which will
only be readable after decryption would be great!
Write a program that encrypts an input string using the following encryption algorithm:
aCreate an array with size at least as big as the length of the plain string.
b For each cell of the array left to right, row by row:
Fill with one character of the plain string at a time.
Replace blanks with asterisks
cFill the additional empty cell with fullstops
d Finally, output the encrypted text by reading the array downward, column by
column.
Example:
Given plain text: "This is a secret text."
Firstly, decide on the number of columns. Suppose you choose
Next, since the length of the text is by dimensional D array is
reasonable An example Darray is given as follows:
Output: issee.setx
Program specifications
Construct Java program called Secret.
Your program would accept an input plain text, encrypt it and print the cipher
output. Hints: Input can be accepted in any form, eg console, dialog box, files, or hardcoded.
Test your program with different plain texts and array column size to ensure error
free.
Include comments to make your class is readable.
Step 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