Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Caecar Cipher decryption write a C program that: can decrypt a plain text with punctuation mark. The output should be encrypted text messages (with a

Caecar Cipher decryption write a C program that:  can decrypt a plain text with punctuation mark. The output should be encrypted text messages (with a maximum length of 256 characters)  requests the desired key from the user (make sure that key > 0 and key < 26),  outputs the read messages encrypted on the console. The program should use certain C features and the following functions to implement:  Define an enum state with two values: "encrypted" and "decrypted"  Define a struct message with three fields: char payload[256]; // Max length 256, messages can too be shorter unsigned int length; // Defines the actual length of the Strings in payload enum state encryptionState; // Defines whether the message in payload is encrypted or decrypted  Implement at least: int readMessage(FILE* fp, struct message* m, enum state encryptionState); void writeMessage(FILE* fp, struct message* m); void printMessage(struct message* m); void encrypt(struct message* m, unsigned int distance); void decrypt(struct message* m, unsigned int distance); void caesarCipher(struct message* m, int distance); 

please provide the code and the output result

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

Finance The Role Of Data Analytics In Manda Due Diligence

Authors: Ps Publishing

1st Edition

B0CR6SKTQG, 979-8873324675

More Books

Students also viewed these Databases questions

Question

Carry out an interview and review its success.

Answered: 1 week ago