Documentation

RC4.php

Pure-PHP implementation of RC4.

Uses mcrypt, if available, and an internal implementation, otherwise.

PHP version 5

Useful resources are as follows:

RC4 is also known as ARCFOUR or ARC4. The reason is elaborated upon at Wikipedia. This class is named RC4 and not ARCFOUR or ARC4 because RC4 is how it is referred to in the SSH1 specification.

Here's a short example of how to use this library:

setKey('abcdefgh'); $size = 10 * 1024; $plaintext = ''; for ($i = 0; $i < $size; $i++) { $plaintext.= 'a'; } echo $rc4->decrypt($rc4->encrypt($plaintext)); ?>
Tags
category

Crypt

author

Jim Wigginton terrafrost@php.net

copyright

2007 Jim Wigginton

license

http://www.opensource.org/licenses/mit-license.html MIT License

link
http://phpseclib.sourceforge.net

Table of Contents

Classes

RC4
Pure-PHP implementation of RC4.

        
On this page

Search results