The cipher we’ll be using is the Caesar cipher, named after the Roman emperor, Julius Caesar. It is one of the most simple ciphers there are and simply shifts each letter along a set number of places. For example, the phrase ‘Hello World’ would become ‘KHOOR ZRUOG’ using a shift of 3 (which it is the shift that Julius Caesar is thought to have used).
You can see an example of the finished code here. Have a play around at writing some secret messages to get a feel for how it works.
To get started, fire up your favorite text editor and save the following as
Source: Site Point
Republished by Blog Post Promoter