Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Write a Java, C# or C/C++ program (the choice is yours) for file/directory processing according to the following rules. The program requested for this project must have a text menu like this:

0 - Exit

1 - Select directory

2 - List directory content (first level)

3 - List directory content (all levels)

4 - Delete file

5 - Display file (hexadecimal view)

6 - Encrypt file (XOR with password)

7 - Decrypt file (XOR with password)

Select option:

The menu is displayed and the user must select an option (a number between 0 and 7). The action corresponding to the selection is performed, then the menu is displayed again and the user can choose another option. This cycle is repeated until the user selects 0, which exits the loop and ends the program.

The options are:

0 - Exit

This options ends the program

1 - Select directory

The user is prompted for a directory [absolute] name. This is the first options that must be selected by the user. All the options below are working on the directory selected here. After performing several operations on the selected directory, the user can select another directory and work with it.

2 - List directory content (first level)

This option displays the content of the selected directory on the screen. All the files and sub-directories from the first level must be displayed (files and directories should be listed separately). If no directory was selected an error message must be displayed.

3 - List directory content (all levels)

This option displays the content of the selected directory on the screen. All the files and sub-directories from the first and subsequent levels must be displayed (files and directories should be listed separately). If no directory was selected an error message must be displayed.

4 - Delete file

This option prompts the user for a filename and deletes that file from the selected directory. If no directory was selected an error message must be displayed. If the directory does not contain the file specified by the user, an error message must be displayed. The filename does not include any path, it's just the name of the file.

5 - Display file (hexadecimal view)

This option prompts the user for a filename (from the selected directory) and displays the content of that file on the screen, in hexadecimal view. If no directory was selected an error message must be displayed. If the directory does not contain the file specified by the user, an error message must be displayed. The filename does not include any path, it's just the name of the file.

Note 1: The hexadecimal view displays each byte of the file in hexadecimal; it should look something like this, but simpler:

Note2: The ASCII representation, the Current Offset and the Value Preview are NOT required; also there is no window, no graphics, no colors, just black and white text display. Being a text only display, you are required to display ONLY the Data Offset and the Hexadecimal Representation.

6 - Encrypt file (XOR with password)

This option prompts the user for a password (max 256 bytes long, may contain letters, digits, other characters) and then prompts the user for a filename and encrypts the content of the selected file using that password. The encryption method is very simple: just XOR the password with the file content byte after byte; the password being shorter than the file content, you must repeat the password as needed.

Example:

passwordpasswordpasswordpasswordpasswordpasswordpass

this is the file content that we need to encrypt now

chiphertext is obtained here by XORing byte to byte

Note1: the user must be prompted for the filename of the encrypted file (containing the ciphertext) as well, otherwise we would need to overwrite the initial file.

Note2: If no directory was selected an error message must be displayed. If the directory does not contain either of the files specified by the user, an error message must be displayed. The filenames do not include any path.

7 - Decrypt file (XOR with password)

This option prompts the user for a password (max 256 bytes long, may contain letters, digits, other characters) and then prompts the user for a filename and decrypts the content of the selected file using that password. The decryption method is very simple: just XOR the password with the file content byte after byte; the password being shorter than the file content, you must repeat the password as needed.

Example:

passwordpasswordpasswordpasswordpasswordpasswordpass

chiphertext is here ...

this is the file content that we had initially

Note1: the user must be prompted for the filename of the decrypted file as well, otherwise we would need to overwrite the initial file.

Note2: it may seem strange that we are using the same operation (XOR) both for encryption and for decryption, but this is how XOR (exclusive OR) works.

Note3: If no directory was selected an error message must be displayed. If the directory does not contain either of the files specified by the user, an error message must be displayed. The filenames do not include any path.

Testing:

1. You should use this file as the test file for Display, Encryption and Decryption.

2. For encryption, use the following password "Qwertyuiop[123$4$567]"

3. After encrypting this file with the above password, you obtain an encrypted file of the same length; after decrypting that file with the same password you should obtain an exact replica of this file, and this must be reflected in the Report document by appropriate screenshots showing the content of the files involved in these operations.

Deliverables:

1. Source code (zipped)

2. A Report showing the program performing each of the 7 actions correctly (use screenshots), plus screenshots showing the error reporting situations

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91646688
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Any help will be appreciatedscenarionbspyou are a

Any help will be appreciated Scenario: You are a networking and communications consultant working for HoustonComm Services, Inc, further referred to as HCS. HCS is a company providing technology consulting services to st ...

Risky business how can us companies protect their digital

Risky Business: How Can U.S. Companies Protect their Digital Assets Overseas? Prepare a 3 to 5 paragraph briefing statement that can be used to answer the above question. Your audience will be attendees at a conference f ...

What is the various security architectures which provides

What is the various security architectures. Which provides the best balance between simplicity and security? Justify your answer.

Question capstone project - informationalthis part of the

Question: Capstone Project - Informational This part of the assignment is NOT FOR GRADING this week. This part of the assignment is to contribute to the capstone project and also to show the instructor that progress is b ...

Question this assignment consists of two 2 sections a

Question: This assignment consists of two (2) sections: a business requirements document and a project plan. You must submit both sections as separate files for the completion of this assignment. Label each file name acc ...

Two one-cent coins were weighed on an electronic balance of

Two one-cent coins were weighed on an electronic balance of high sensitivity, and an average mass per coin of 2.4918 g was obtained from the data. How could you use the same number of significant figures as the value obt ...

A soda vendor at aloha stadium noticed that during rainbow

A soda vendor at Aloha Stadium noticed that during Rainbow Warrior football games that more soda is being served the warmer the temperature during game time. Based on 40 home games covering the past 5 years, the vendor e ...

What statistic was calculated to determine differences

What statistic was calculated to determine differences between the intervention and control groups for the lumbar and femur neck BMDs? Were the groups significantly different for BMDs?

Savings account balance write a program that calculates the

Savings Account Balance Write a program that calculates the balance of a savings account at the end of a period of time. It should ask the user for the annual interest rate, the starting balance, and the number of months ...

Question suppose you are comparing two algorithms a and b

Question : Suppose you are comparing two algorithms A and B that run on the same machine. The running time of A is 10n log2 n and the running time of B is 50n (assume these are exact running time). What is the smallest v ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As