Skip to content

rickyrobinett/CaesarCipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caesar Cipher

A PHP Port of Rob Spectre's Python Caesar Cipher library. Encode, decode and crack messages with Caesar Shift Cipher.

Build Status Coverage Status Total Downloads

Installation

You can install this library using composer

composer require caesarcipher/caesarcipher

Usage

Encoding a message with an offset:

$cipher = new CaesarCipher();
$message = "Brooklyn";
$cipher->encode($message,5);

Decoding a ciphertext with an offset:

$cipher = new CaesarCipher();
$message = "Uxjmjp";
$cipher->decode($message,5);

Cracking a ciphertext without knowing the offset:

$cipher = new CaesarCipher();
$cipher_text = "Bj qfhp ymj rtynts yt rtaj yt ymj sjb gjfy!";
$crack_text = $cipher->crack($cipher_text);

About

A PHP package for encoding, decoding and cracking the Caesar shift cipher

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages