What is Encryption the Process of Converting Data

Download Solution Order New Solution

Assignment Task

Encryption is a process of converting a message, image, or any other form of data into encoded data that can only be decoded by someone who can decrypt the message (usually with a passkey, decryption key or the like). A good encryption algorithm should produce output that looks random to a bystander but is easily decipherable with the correct passkey. Thus, encryption algorithms make use of pseudo-random encryption keys.

In this assignment, you will implement and use simple cypher of characters to generate a message.

Your Program  

In the Encryption assignment, you will write a word scrambling program in Java with a class name of EncryptionLastnameFirstname, and use this program to generate encrypted messages and translate encrypted messages. These are the features and interfaces involved in this assignment:

  • Prompt the user to select whether they would like to (1) encrypt a message or (2) decrypt a message. User will enter 1 or 2.  Any other input will be handled with an input validation loop.  (You may need some research on your own so it can handle random letter input instead of 1 or 2.  There are a couple of ways to handle this.)
  • Prompt the user to input the name of a text file that contains the message they wish to encrypt or decrypt. The user can just enter “test”, for example, and it’ll automatically append “.txt” behind it and look for the file “test.txt” in the folder.
  • It’ll have user input validation. If the input is not 1 or 2 when selecting to encrypt or decrypt a message, it’ll ask repeatedly until it is 1 or 2.  Do the same validation if the file entered is not found (There are a couple of ways to do this.  You may need to do some research on your own).
  • Creates the encrypted/decrypted message as a text file. For encrypting a file, it’ll save encrypted message in a file called “enc.txt”.  For decrypting a file, it’ll save decrypted message in a file called “dec.txt”. 
  • Use the Cypher Table below for encryption and decryption. If any characters are not a part of the cypher, that symbol is not omitted and instead remains the same character.

Top row is the original, bottom row is the encryption.

Use the similar rule for lowercase.  (ie.  a is encrypted to b, just like A to B)

 

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

B

D

R

P

O

V

Z

M

X

H

S

L

U

Y

T

F

N

K

G

J

 

U

V

W

X

Y

Z

0

1

2

3

4

5

6

7

8

9

 

.

,

-

Q

C

A

I

W

E

3

0

5

2

9

4

7

6

1

8

,

-

.

 

 

  • You must use what you learned in class such as 1 Dimensional Array, built-in methods in Sting or Character class (you can refer to Java API documents for String and Character), and File I/O.
  • You must also use module approach to design and create suitable methods to organize your code. For example, printMenu, validateInput, encryptMessage… etc.  You do your own method designs and create your own methods, the parameter list they need to take on, the consideration on pass by value vs pass by reference, and whether they need to be a function type or procedure type method.
  • You can open the text files to check if the encryption or decryption process is done correctly.

This IT Computer Science has been solved by our PhD Experts at My Uni Paper.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.