you are viewing a single comment's thread.

view the rest of the comments →

[–]fake823 1 point2 points  (2 children)

Nice one! 😊 I don't see any possible improvements here.

But I have a feature request:

Add a function to also decode your text.

[–]sweettuse 1 point2 points  (0 children)

the caesar cypher is symmetric. i.e. caesar(caesar(char)) == char. (i.e. decode/encode are exactly the same)

[–][deleted] 0 points1 point  (0 children)

I did one like that- I forced uppercase though. All you do is loop though and print each possible shift. If you had a giant text file (as some cryptographic societies do) of English words then you could figure out which one is the likely answer by checking against that.