-
Notifications
You must be signed in to change notification settings - Fork 11
A PHP implementation of RC4 based on the original C code from the 1994 usenet post.
License
cotdp/php-rc4
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
I wrote this RC4/ARCFOUR implementation in PHP - based on the original C source code posted on usenet in 1994. The rc4() call itself is completely self-contained, two other methods rc4_test() and rc4_benchmark() have been provided for testing and are optional. Examples: 1. Simple encryption & decryption <?php require_once( "rc4.php" ); $key = "0123456789abcdef"; $plaintext = "Hello World!"; $ciphertext = rc4( $key, $plaintext ); $decrypted = rc4( $key, $ciphertext ); echo $decrypted . " - " . $plaintext . "\n"; ?> 2. Execute the tests and display the results <?php require_once( "rc4tests.php" ); // Auto includes rc4.php echo rc4_tests(); ?> 3. Execute the tests as benchmarks and display the results <?php require_once( "rc4tests.php" ); // Auto includes rc4.php echo rc4_benchmark(); ?> http://cotdp.com/blog/2006/03/rc4-arcfour-implementation-in-php.html
About
A PHP implementation of RC4 based on the original C code from the 1994 usenet post.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published