encryption step of a Onetime pad cipher | My Assignment Tutor

Assignment 1 [25 marks]Exercise 1 [20 marks]Write a cpp program call onetimepad.cpp that will perform the encryption step of a Onetime pad cipher. First the program will ask for the name of the file with the pad then the position(needs to be greater than zero) to start encrypting from and finally the name of the file that willbe encrypted. Your program should not encrypt numbers and should remove all non-letter andnon-number characters, this includes newline characters (there should be no newline charactersin the encrypted file). A 3 will stay a 3, and a ‘.‘ would not be added to the encrypted file. In bothcases these will not advance the position in the key. All encrypted letters should be in uppercase. Your program then should print the encrypted message to the console. If your startposition is longer than the pad you should print a message to the user and not encrypt themessage. If you run out of letters in the pad you should stop encrypting and print out amessage. Your program should not read in and store the whole pad. Your programshould be able to run on any pad and any message not just the examples given.1. Write at least 4 functions(you may want more)a. int main()i. remember to keep it as short as possibleb. char shiftchar(char og, char shift)i. will shift over og by shift (og = ‘B’ and shift = ‘C’ will return ‘D)’c. void getPos(int &pos)i. should ask the starting position on the padd. std::string getMsg(const std::string &filename)i. should return a string the contains that whole msgSample OutputSubmissionsMake sure that your code is neat and is well commented [5 marks]Submit to D2L a zip/archive file containing the .cpp you have written.

QUALITY: 100% ORIGINAL PAPER – NO PLAGIARISM – CUSTOM PAPER

Leave a Reply

Your email address will not be published.