Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4: 10 Marks A company wants to transmit data over the telephone, but they are concerned that their phones may be tapped. All of

image text in transcribed

Question 4: 10 Marks A company wants to transmit data over the telephone, but they are concerned that their phones may be tapped. All of their data are transmitted as four-digit integers. Create a structure that store the transmit data. The structure consists of two strings i.e. "send_from", "Sent_to" and an integer "four-digit integer". They have asked you to write a program that encrypts their data so that it can be transmitted more securely. Your program should consist of a function called 'encryption that take argument, pass by reference a four-digit integer and encrypt it as follows: Replace each digit by (the sum of that digit plus 7) modulus 10. Then, swap the first digit with the third, swap the second digit with the fourth. At last return the encrypted integer to main (). Write another function called 'decryption that takes an encrypted four-digit integer as parameter and decrypts it to form the original number and return the original no to main function. At last print, send_from, sent_to, encrypted and decrypted integer. Note: Use only C_Type string in whole program

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

Step: 3

blur-text-image

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

Explain how labour relations practices differ around the world.

Answered: 1 week ago

Question

=+and non-compete agreements in three to five different countries.

Answered: 1 week ago