Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started