A simple implementation of the Caesar's Cipher written in Ruby programming language.
The Caesar's Cipher is one of the simplest and most widely known encryption techniques. It is a substitution cipher in which each letter in the plaintext is shifted a certain number of places down the alphabet.
To use the code, you can clone this repository and run the file v2.rb
. You will start the CLI that guide you to the usage and operations possible.
Otherwise, you can just run or add the caesar_cipher.rb
in your code and call the function as this:
caesar_cipher(string, shift_factor, operation)
string
: the string you want to cipher or deciphershift_factor
: the number of letters you want to shiftoperation
: the operation you want to do with the string,1
to cipher and-1
to decipher
Feel free to contribute to this project by opening an issue or a pull request.
This project is licensed under the Mozilla Public License 2.0