Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
The Modern C++ Challenge

You're reading from   The Modern C++ Challenge Become an expert programmer by solving real-world problems

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781788993869
Length 328 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (20) Chapters Close

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
1. Math Problems FREE CHAPTER 2. Language Features 3. Strings and Regular Expressions 4. Streams and Filesystems 5. Date and Time 6. Algorithms and Data Structures 7. Concurrency 8. Design Patterns 9. Data Serialization 10. Archives, Images, and Databases 11. Cryptography 12. Networking and Services 1. Bibliography 2. Other Books You May Enjoy Index

Solutions


88. Caesar cipher

Caesar cipher, also known as Caesar’s cipherCaesar’s codeCaesar shift, or shift cipher, is a very old, simple, and widely known encryption technique that substitutes each letter in the plain-text with a letter some fixed number of positions down the alphabet. This method was used by Julius Caesar to protect messages of military importance. He used a shift of three letters, therefore replacing A with D, B with E, and so on. In this encoding, the text CPPCHALLENGER becomes FSSFKDOOHQJHU. The cipher is described in detail on Wikipedia at https://en.wikipedia.org/wiki/Caesar_cipher.

Note

Although the Caesar cipher has no place in modern cryptography since it is trivial to break, it is still used on online forums or newsgroups as a way to scramble text to hide spoilers, offensive words, puzzle solutions, and so on. This problem is intended only as a simple exercise along these lines. You should not use such a simple substitution cipher for any cryptographic purposes...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images