A PHP Port of Rob Spectre's Python Caesar Cipher library. Encode, decode and crack messages with Caesar Shift Cipher.
You can install this library using composer
composer require caesarcipher/caesarcipher
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);