| core_crypt

# Class: Bs_Rc4Crypt Source Location: /core/crypt/Bs_Rc4Crypt.class.php
### Class Overview
    Bs_Object
       |
       --Bs_Rc4Crypt
RC4 Class (Pure PHP. No libmcrypt 2.4.x needed.) Fairly fast, secure and symmetric en- and decryption algorithm. #### Author(s): Sam Blum <at blueshoes dot org> (Based on code from Mukul Sabharwal [mukulsabharwal@yahoo.com]) #### Version: 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:47:48 $ #### Copyright: blueshoes.org | ### Methods Bs_Rc4Crypt crypt decrypt encrypt
### Inherited Variables | ### Inherited Methods #### Class: Bs_Object Bs_Object::Bs_Object() Bs_Object::getErrors() Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack. Bs_Object::getLastError() Basic error handling: Get last error string from the global Bs_Error-error stack. Bs_Object::getLastErrors() Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors(). Bs_Object::persist() Persists this object by serializing it and saving it to a file with unique name. Bs_Object::setError() Basic error handling: Push an error string on the global Bs_Error-error stack. Bs_Object::toHtml() Dumps the content of this object to a string using PHP's var_dump(). Bs_Object::toString() Dumps the content of this object to a string using PHP's var_dump(). Bs_Object::unpersist() Fetches an object that was persisted with persist()
### Class Details [line 23] RC4 Class (Pure PHP. No libmcrypt 2.4.x needed.) Fairly fast, secure and symmetric en- and decryption algorithm. What is RC4 ? (by Mukul Sabharwal) RC4 is fairly fast, secure and symmetric encryption algorithm. Devloped by Ron Rivest in 1987 was kept trade secret until 9th September 1994 when it was posted on a Cypherpunks mailing list. Generally the key it uses is limited to 40 bits for various legal reasons but 128bits is the more common forms these days. #### Tags:
copyright: | blueshoes.org
version: | 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:47:48 $
author: | Sam Blum <at blueshoes dot org> (Based on code from Mukul Sabharwal [mukulsabharwal@yahoo.com])
[ Top ] ### Class Methods ### constructor Bs_Rc4Crypt [line 29]
`Bs_Rc4Crypt Bs_Rc4Crypt( )`
constructor [ Top ] ### method crypt [line 44]
`string crypt( string $pwd, mixed $data, string &$data)`
*********************************************************************** Do a RC4 en- or decrypt. It's symmetric. That means it uses the function for encrypting and for decrypting. #### Tags:
return: | A byte-stream of data.
access: | public
#### Parameters:
string | $pwd | The en-/decrypt password (key). May be up to 256 byte.
string | &$data | The data to be en-/decrypted.
[ Top ] ### method decrypt [line 88]
`void decrypt( mixed $pwd, mixed $data)`
*********************************************************************** Do a RC4 en- or decrypt. It's symmetric. That means it uses the function for encrypting and for decrypting. [ Top ] ### method encrypt [line 91]
`void encrypt( mixed $pwd, mixed $data)`
[ Top ] Documentation generated on Mon, 29 Dec 2003 21:12:32 +0100 by phpDocumentor 1.2.3