Vous êtes sur la page 1sur 2

In this first assignment of the series you will use basic Java concepts to build simple

cryptographic tools that converge to what sophisticated platforms and frameworks do.
In this task you are expected to illustrate your comprehension of the following:
▪ Parsing Java program command line arguments
▪ Handling exceptional potential cases in command line arguments
▪ File I/Os including reading from and writing to simply formatted text files
▪ Cryptography concepts including: checksum, secrets, encryption, and decryption
In addition to submitting the coding task as Java source code; you will be required to
conduct a simple research of no more than three pages regarding simple topic
surrounding the Java programming language.

Assignment 1:
▪ Program 1: Build a command line Java program that takes three parameters: a
switch, a secret, and a message. The switch is either (-e/-E) or (-d/-D) where the -E
directs the program to encrypt the third parameter (message) using the second
parameter (secret). The -D directs the program to decrypt an encrypted message.
▪ Either encrypting or decrypting the message; you need to print the output directly to
the console.
▪ Program 2: Modify the command line tool resulted from Program 1 to accept a text file
as an input instead of an inline message, and to output the result to an output file
instead of printing to console.
▪ Requirements: In case of encryption; the summation of all character values consisting,
the message should be appended to the message prior to applying encryption overall
appended message and its checksum. In case of decryption; it is necessary to
recalculate the checksum and print out an error message in case the encrypted
message checksum does not match originally embedded within the encrypted message.
▪ It is up to you to figure out a suitable mathematical algorithm that shall utilize the
second parameter (secret) in the cryptography process.
▪ Remember handling the improper command line parameter inputs by showing a
proper program usage message and exiting with an error code.

Research Assignment 2:
Try to answer the following questions in no more than three pages with your own
language (do not copy from the net please):
▪ What is the difference between Java as a programming language, J2EE as a
technology platform, and JVM as a runtime environment for Java programs?
▪ Why JVM programs are considered less performing when compared with languages
like: C, C++, GoLang, and Python? Try to sort these languages in a descending order
based on their performance; the highest comes first.
▪ Do you believe that your compiled Java code (class / jar) can be cracked and the
crypto algorithm hence can be revealed? Why or why not? And if yes, how can you
forbid that?
You are required to submit the programs 1 and 2 in source code along with the three-
pager research document in any readable text format: (TXT, WORD, or PDF).