Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Suppose that you wish to setup a secure communication between you and your secret team members

Suppose that you wish to setup a secure communication between you and your secret team members

Computer Science

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! make a program that encrypts an input string using the following encryption algorithm:

(a) make 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 (*).

(c) Fill the additional empty cell with full-stops(.).

(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 4.

• Next, since the length of the text is 22, 6 by 4 2-dimensional (2D) array is

reasonable ((6*4=24)). An example 2D-array is given as follows:

java.PNG

• Output: "T*ac*thi*rt.issee.s*etx."

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, e.g. console, dialog box, files, or

hard-coded.

• Test your program with different plain texts and array column size to ensure

error-free.

• Include comments to make your class is readable.

• make another method to decrypt the ciphertext into plain text.

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions