felixdorn / php-rc4
RC4/ARC4 encryption/decryption library for PHP.
0.1.0
2024-03-21 12:43 UTC
Requires
- php: ^8.3
- ext-mbstring: *
Requires (Dev)
- laravel/pint: ^1.14
- pestphp/pest: ^2.34
- phpstan/phpstan: ^1.10
- symfony/var-dumper: ^7
README
Installation
Requires PHP 8.3+
You can install the package via composer:
composer require felixdorn/php-rc4
Usage
$encrypted = \Felix\RC4\RC4::rc4('key', 'data') $decrypted = \Felix\RC4\RC4::rc4('key', $encrypted);
In tests
\Felix\RC4\RC4::fake(function ($key, $data) { // Fake it if you need to for some reason. });
Helpers
rc4('key', 'data'); // calls RC4::rc4 // Or, to be semantic: $encrypted = rc4_encrypt('key', 'data'); $decrypted = rc4_decrypt('key', 'data'); // But both call rc4() under the hood
Testing
composer test
php-rc4 was created by Félix Dorn under the MIT license.