Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is a textbook exercise BOOK NAME: Fundamentals of Computer Programming with Programming Basics with C# ( English ) C#: Crypto Interface Project Encryption can
This is a textbook exercise BOOK NAME: Fundamentals of Computer Programming with Programming Basics with C# English C#: Crypto Interface Project
Encryption can be described as the process of writing data in a secret code. Decryption is the process of restoring encrypted data to its original state. If you want to send a secret message to someone, you use an encryption algorithm to encrypt the message before you send it The person receiving the encrypted message must use a decryption algorithm to convert the message to its original contents. Although not very secure one of the simplest types of encryption algorithms is the substitution algorithm. A substitution algorithm takes a string and substitutes each character with some other predefined character. For example, each occurrence of the letter A might be substituted with the letter M and each occurrence of the letter B might be substituted with the letter W To decrypt the message, the substitutions must happen in reverse.
In this programming problem, you will create a project and add the following interface:
interface Crypto
string Encryptstring str;
string Decryptstring str;
The Crypto interface specifies two methods: encrypt and decrypt. The intention of the encrypt method is to accept a string argument and return an encrypted version of that string. The intention of the decrypt method is to accept the encrypted string and return a decrypted version of that string.
Next, you will write two classes named Cipher and Cipher Each of these classes must implement the Crypto interface. The Cipher class will use a substitution algorithm to encrypt and decrypt strings, and the Cipher class will use a different substitution algorithm to encrypt and decrypt strings. You must design the algorithm for each class.
Once you have written the interface and the classes, create a user interface that allows the user to enter a message. The application should then perform the following:
Encrypt the message using the Cipher object and display the encrypted message that is returned from the Cipher object's Encrypt method.
Decrypt the message using the Cipher object and display the decrypted message that is returned from the Cipher object's Decrypt method. This should be the same as the original message.
Encrypt the message using the Cipher object and display the encrypted message that is returned from the Cipher object's Encrypt method.
Decrypt the message using the Cipher object and display the decrypted message that is returned from the Cipher object's Decrypt method. This should be the same as the original message.
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