Question: In cryptography a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most
In cryptography a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it in his private correspondence.
Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: XYZABCDEFGHIJKLMNOPQRSTUVW
WAP in C++ to perform right shift Caesar cipher on a well-known children's poem.
You are provided with a text file. Read the text from the file, perform the encryption and write the output to another file
Encryption Key
3-right-shift
Lab-10_PlainText.txt
Content of text file is:
Mary had a little lamb Little lamb, little lamb Mary had a little lamb Its fleece was white as snow And everywhere that Mary went Mary went, Mary went Everywhere that Mary went The lamb was sure to go He followed her to school one day School one day, school one day He followed her to school one day Which was against the rule It made the children laugh and play Laugh and play, laugh and play It made the children laugh and play To see a lamb at school And so the teacher turned him out Turned him out, turned him out And so the teacher turned him out But still he lingered near And waited patiently Patiently, patiently And wai-aited patiently Til Mary did appear Mary had a little lamb Little lamb, little lamb Mary had a little lamb Its fleece was white as snow And everywhere that Mary went Mary went, Mary went Everywhere that Mary went The lamb was sure to go
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
