ZASMan / caesar_cipher

A basic string encryption script, done as a task for the Odin Project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caesar cipher

I originally did this as a challenge from the Odin Project in October 2016, coming back in April 2018 to add some tests and improve the code a bit!

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.
caesar_cypher("What a string!", 5)
"Bmfy f xywnsl!"

About

A basic string encryption script, done as a task for the Odin Project.


Languages

Language:Ruby 100.0%