2017 © Pedro Peláez
 

library caesar-cipher

Encrypt, decrypt and crack messages using the simple Caesar Cipher algorithm.

image

kkiernan/caesar-cipher

Encrypt, decrypt and crack messages using the simple Caesar Cipher algorithm.

  • Friday, May 5, 2017
  • by kkiernan
  • Repository
  • 1 Watchers
  • 4 Stars
  • 235 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 5 Versions
  • 161 % Grown

The README.md

Caesar Cipher

A basic Caesar Cipher class in PHP for fun and learning., (*1)

Build Status Style Status, (*2)

, (*3)

Installation

Install the package using Composer., (*4)

composer require kkiernan/caesar-cipher

Instantiation

Create a new CaesarCipher instance. Make sure to import the class or use the fully qualified class name., (*5)

$cipher = new KKiernan\CaesarCipher();

Available Methods

Encrypt

To encrypt a message, pass the CaesarCipher instance some plaintext and a key. In a Caesar Cipher, the key is just the number of places to shift each letter in the plaintext., (*6)

$ciphertext = $cipher->encrypt('This is a plain text message that will be encrypted!', 8);

Decrypt

To decrypt a ciphertext, use the decrypt method on the CaesarCipher instance. Pass in the ciphertext and the key that was used to encrypt the message., (*7)

$plaintext = $cipher->decrypt($ciphertext, 8);

Crack

You can attempt to crack an encrypted message by using the crack method, which will return a best guess for the key's value. Use the key to retrieve the plaintext., (*8)

$key = $cipher->crack('Max wtrl tkx zxmmbgz lahkm tztbg.');

$plaintext = $this->decrypt($ciphertext, $key);

Security

This was written for fun and learning very basic encryption techniques (like substitution in this case). Obviously Caesar Cipher is not a secure encryption algorithm (only 25 possible keys), so don't use this for anything sensitive. It's really a toy meant for fun., (*9)

The Versions

05/05 2017

dev-master

9999999-dev

Encrypt, decrypt and crack messages using the simple Caesar Cipher algorithm.

  Sources   Download

MIT

The Development Requires

05/05 2017

v1.3

1.3.0.0

Encrypt, decrypt and crack messages using the simple Caesar Cipher algorithm.

  Sources   Download

MIT

The Development Requires

04/12 2016

v1.2

1.2.0.0

Encrypt, decrypt and crack messages using the simple Caesar Cipher algorithm.

  Sources   Download

MIT

The Development Requires

19/04 2016

1.1

1.1.0.0

Encrypt, decrypt and crack messages using the simple Caesar Cipher algorithm.

  Sources   Download

MIT

The Development Requires

19/04 2016

1.0

1.0.0.0

Encrypt, decrypt and crack messages using the simple Caesar Cipher.

  Sources   Download

MIT

The Requires