Question: 6. use printf() to prompt the user for a 4-bit key to encrypt the data (e.g. 0110, 1010, etc.) 7. use getchar() to read in

 6. use printf() to prompt the user for a 4-bit key

6. use printf() to prompt the user for a 4-bit key to encrypt the data (e.g. 0110, 1010, etc.) 7. use getchar() to read in each digit of the 4 digit key 8. Without storing the four digits of the key, create an 8-bit key from those 4 digits using the bitwise OR instruction. For example, if the user specifies 0110, then you internal key must be 0110 0110. As an alternative, you could use the bitwise OR instruction and a shift instruction 9. Once you have created an 8-bit key, you must XOR the key with each character of clear text to get each character of cipher text. 10. Print out each hexadecimal cipher text value with 10 values per row. It should be similar to the output of the hex encoding above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!