11<h1 align =" center " ><b >Implementation of Vigenere Cipher in PHP</b ></h1 >
22<p align =" center " >
3- <img src =" https://img.shields.io/packagist/dt/amculin/vigenere-cipher " alt =" Packagist Download " />
43 <img src =" https://img.shields.io/github/stars/amculin/php-vigenere-cipher " alt =" GitHub Repo stars " />
4+ <img src =" https://img.shields.io/packagist/dt/amculin/vigenere-cipher " alt =" Packagist Download " />
55 <img src =" https://img.shields.io/packagist/v/amculin/vigenere-cipher " alt =" Packagist Version " />
66 <img src =" https://img.shields.io/github/actions/workflow/status/amculin/php-vigenere-cipher/build.yml " alt =" Passed Build Workflow " />
77 <img src =" https://img.shields.io/badge/PHPStan-L_10-blue " alt =" Passed PHPStan Level 10 " />
88</p >
9+ <p align =" center " >
10+ <img src =" https://img.shields.io/badge/PHP_CS_Fixer-Optimized-green " alt =" Optimized with PHP CS Fixer " />
11+ <img src =" https://img.shields.io/badge/Psalm-Checked-green " alt =" Checked using Psalm " />
12+ </p >
913
1014Encrypt/decrypt string using Vigenere Cipher algorithm
1115## Instalation
@@ -22,6 +26,7 @@ $key = 'thisisthekey';
2226
2327//Basic mode only support lowercase alphabet
2428//You can use alpha_numeric mode for wider supported characters (a-z, A-Z, 0-9)
29+ //You can also use base64 mode to use Radix-64 character list (A-Z, a-z, 0-9, +/=)
2530$encrypted = VigenereCipher::encrypt($data, $key, 'basic');
2631
2732echo "Plain text: {$data}\n";
@@ -59,7 +64,9 @@ Plain text: testtheencryptionprocess
5964- [x] Support alpha-numeric mode (a-z, A-Z, 0-9)
6065- [x] Unit test
6166- [x] Comply PHPStan Level 10
67+ - [x] Checked using Psalm
68+ - [x] Optimized using PHP CS Fixer
69+ - [x] Add Base64 mode to support Base64 string
6270
6371## Todos
6472- [ ] Add ASCII mode to support file encryption/decryption
65- - [ ] Add Base64 mode to support Base64 string
0 commit comments