Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
/ php-rc4 Public

A PHP implementation of RC4 based on the original C code from the 1994 usenet post.

License

Notifications You must be signed in to change notification settings

cotdp/php-rc4

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
2 Commits
 
 
 
 
 
 

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

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.