Installation
$ gem install caesar_cipher
Usage
Ruby Script
require 'caesar_cipher'
caesar = CaesarCipher::Caesar.new
caesar.cipher "hello" caesar.decipher "asvph"
caesar = CaesarCipher::Caesar.new 8
caesar.cipher "hello" caesar.decipher "ewztl"
Command Line
$ caesar_cipher --help
Usage: caesar_cipher [options] text
Is a simple Caesar Cipher ruby implementation
v0.0.1
Options:
-h, --help Show command line help
--version Show help/version info
-d, --decipher Decipher
-s, --shift SHIFT Shift
(default: 4)
-o, --output FILE Output File
$ caesar_cipher "hello" # returns "lipps"
$ caesar_cipher -d "asvph" # returns "world"
$ caesar_cipher -s 8 "hello" # returns "pmttw"
$ caesar_cipher -s 8 -d "ewztl" # returns "world"