Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 602 Bytes

README.md

File metadata and controls

13 lines (7 loc) · 602 Bytes

Caesar Cypher

The action of a Caesar cipher is to replace each plaintext letter with a different one a fixed number of places up or down the alphabet.

This program performs a variation of the Caesar shift. The shift increases by 1 for each character (on each iteration).

If the shift is initially 1, the first character of the message to be encoded will be shifted by 1, the second character will be shifted by 2, etc...

u = "I should have known that you would have a perfect answer for me!!!"

movingShift(u, 1) returns:

v = "J ukszrk pjfp wacld kztn tkr unumf keak h xnbqqph pdjoxl ako kd!!!"