def / cipher
Caesar cipher and others
dev-master
2016-08-29 18:05 UTC
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2024-10-29 04:36:34 UTC
README
use def\Cipher\CaesarCipher; use def\Cipher\Alphabet\EnglishAlphabet; $rot13 = new CaesarCipher(new EnglishAlphabet, 13); print $rot13->encode("Hello, world\n");
or
use def\Cipher\VigenereCipher; use def\Cipher\Alphabet\EnglishAlphabet; $cipher = new VigenereCipher(new EnglishAlphabet, "keyword"); print $cipher->encode("Hello, world\n");