[SOLVED] CECS326 Homework 24   

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon homework24-cyqiyv.zip (17.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Chapter 14 (Page 11 through 18)

Purpose: This assignment provides experience with encryption.

  • Get a copy of the instructors c program.

Compile it and run it. Make sure you can explain what the program prints. (Don’t turn anything in for this part.)

  • Redo homework 2 (c) (yet again).
  1. As you make the copy, encrypt (or decrypt) each block before you write it. The key may be embedded inthe code (like my example).
  2. Add a fourth commandline parameter to your c. If the argv[3][0] is ’e’ encrypt while doing the copy. Otherwise decrypt.

Hint: place an if statement before you start the copy, set a variable to either DES_ENCRYPT or DES_DECRYPT. Use the variable in your copy.

Example:

a.out encrypt.c crypted_file e Produces an encrypted version of encrypt.c

a.out crypted_file encrypted_copy.txt d

Produces an encrypted version of crypted_file (which should be identical to the original file).

File: encrypt.c is a copy of what I used in lecture. It should compile and run.

 

  • homework24-cyqiyv.zip