20 Jul CRYPTOGRAPHY.
Cryptography. The science of developing secret codes has interested many people for centuries.
Some of the simplest codes involve replacing a character, or a group of characters, with another
character, or group of characters. To easily decode these messages, the decoder needs the “key”
that shows the replacement characters. For your second project you will write two programs that
do the following:
1. Write a program to implement a simple code that replaces each character by another character
that is a fixed number of positions away in the collating sequence. For example, if each character
is replaced by the character that is two characters to the right, then the letter ‘a’ is replaced by the
letter ‘c’, the letter ‘b’ is replaced by the letter ‘d’, and so on. Your program should be able to
read a text in a file (create your own, name it “message.txt”), and then generate a new file that
contains the coded text using this encryption technique (name it “encryptMessage.txt”). Do not
change the newline characters or the EOF character.
Your program should allow the user to choose the “key” for encryption, i.e. if the user enters 4
then each character is replaced by a character that is 4 characters to the right or if the user enters
-4 then each character is replaced by 4 characters to the left. Use an ASCII character chart to
make sure that you are replacing the characters properly.
Your program should also create a file called “key.txt” that contains the key used to encrypt the
message.
2. Write a program that will decode the encryption scheme in problem 1. Test your program
using the files generated in 1.
What to turn in: For this project you will only need to turn in the code (just like you have done
for home works and project 1) and the text files used/generated for part 1. Your *.c file must be
well documented, i.e. you must include comments throughout the program. The code must
readable i.e. user proper spacing and indentation. I will be testing your programs using the files
you provide as well as my own message file.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
