Coder Social home page Coder Social logo

joy2g / php-rc4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cotdp/php-rc4

0.0 2.0 0.0 94 KB

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

Home Page: http://cotdp.com/

License: Apache License 2.0

PHP 100.00%

php-rc4's Introduction

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

php-rc4's People

Contributors

cotdp avatar

Watchers

James Cloos avatar Joy2g avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.