Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7.5 Bit Encryption 7.5.1 Probleas Given a single dhapacter, apply a sinple bitrise encryption algarithm and reture the cipber character. 7.5.2 Preconditions tions as long

image text in transcribed
7.5 Bit Encryption 7.5.1 Probleas Given a single dhapacter, apply a sinple bitrise encryption algarithm and reture the cipber character. 7.5.2 Preconditions tions as long as the requested fubettions execute correctly. Do not include a main fanction in your soure of beader bles. You will be perforning a simple enctyption using bitwise operators. Becall that a darkiter (chat) is an 8-hit integer, and thus cab be manipalatied uxing bitwise fusctions. You will rexive two integers in addition to the character. a potential integer averflons. 7,5.3 Pesteonditions The encrypaiof peocus should be performed as follows: 1. Reverse tho eharacter's binary reptesentation. 2. Convert the reservol ahararter to an integger. 3. Left shift the integer an amoent equal to the start value. 4. Pight shift the integer an amomit ecqual to the offert vilio. 5. Peturn the resultant integer. The decryption perens should sceegt a ciplur nalue and undo the nmeryption thevel oe the start nod offert values in receives. It sbould then return a character which is the same as the original menerypted character. 7.5.4 Restrictiona Yoa may not iee any structs of manaal mernocy albocation. We lhave not inarued polatren yet, bet you may feet fee to nes thrs. 7.5.5 File Requirements This roetract requires you to peuvide a C suree filo named codes.e ant a C header filp nathed eodes.h. Your brader testing- Your source and beudes filss shosald be placed in the Lab3/codes/ directory in your Git Lah repositocy. 7.5.6 Testing To test your code, you can oompile yoisr noerce file with the coshesMoo object file found in Cl/objects/codes/. It can then be exrevied as sormal. The codes main function will test yoar code sereral times and produce a number of outputs which match the following format: atT.tacamp,swectss : e99, - 118784,499 These mumbers show what the main function has attempted to do with your functiuns. First, it starts at a dar with value e becoenes when decrypted, represented by d. Thiss means the above log emtry sivs we started with a value of 99, ebcrypted it and it became - 118784, then dectypted that value and got 99 again. If your coile is working progerly, the value of e and d shoolit be the same. If your c and d vilyes are differeat, thea the eacryptioe and/oe decryptina procest has fallidel and you sherald do mure tistibg. 7.5.7 Sample Inputs and Outputs Sample inprats abd oetputs are avallable via the object file. When executed, it will output sucress abd error mescagns. along with the paramutres wol to test them

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

What are the HR forecasting techniques?

Answered: 1 week ago