Question: Using Scheme higher-order function map to implement the string encryption and decrption. [10 points] 1.1 The encryption function must (1) take the encryption key (key

Using Scheme higher-order function map to implement the string encryption and decrption. [10 points]

1.1 The encryption function must (1) take the encryption key (key can be between 1 and 4) from the keyboard using (read); and (2) encrypt alphabetic characters and digits only. [5]

1.2 The decryption function must (1) take the encryption key from the keyboard using (read) and (2) decrypt the string generated from your encryption function. [5] Test cases: (encrypt "Hello CSE240!") (decrypt "Khoor FVH573!") 3 "Khoor FVH573!" 3 "Hello CSE240!" Note: When you encrypt a valid character (letters and digits), you add a key to the character. When you decrypt, you will have a different set of the valid characters, which is caused by +key. You can limit the allowed key value to be 1, 2, 3, and 4.

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!