Crypt
[ class tree: Crypt ] [ index: Crypt ] [ all elements ]

Class: Crypt_RC4

Source Location: /pear/Crypt/Rc4.php

Class Overview


RC4 stream cipher routines implementation


Author(s):

Version:

  • $Revision: 1.6 $

Variables

Methods



Class Details

[line 44]
RC4 stream cipher routines implementation

in PHP4 based on code written by Damien Miller <djm@mindrot.org>

Usage: $key = "pear"; $message = "PEAR rulez!";

$rc4 = new Crypt_RC4; $rc4->key($key); echo "Original message: $message
\n"; $rc4->crypt($message); echo "Encrypted message: $message
\n"; $rc4->decrypt($message); echo "Decrypted message: $message
\n";




Tags:

author:  Dave Mertens <dmertens@zyprexia.com>
version:  $Revision: 1.6 $
access:  public


[ Top ]


Class Variables

$i =  0

[line 55]

Real programmers...


Type:   array


[ Top ]

$j =  0

[line 60]

Real programmers...


Type:   array


[ Top ]

$s = array()

[line 50]

Real programmers...


Type:   array


[ Top ]

$_key =

[line 66]

Key holder


Type:   string


[ Top ]



Class Methods


constructor Crypt_RC4 [line 77]

void Crypt_RC4( [string $key = null])

Constructor Pass encryption key to key()



Tags:

see:  Crypt_RC4::key()
access:  public


Parameters:

string   $key   key - Key which will be used for encryption

[ Top ]

method crypt [line 118]

void crypt( string &$paramstr)

Encrypt function



Tags:

access:  public


Parameters:

string   &$paramstr   paramstr - string that will encrypted

[ Top ]

method decrypt [line 144]

void decrypt( string &$paramstr)

Decrypt function



Tags:

access:  public


Parameters:

string   &$paramstr   paramstr - string that will decrypted

[ Top ]

method key [line 95]

void key( string &$key)

Assign encryption key to class



Tags:

access:  public


Parameters:

string   &$key   key - Key which will be used for encryption

[ Top ]

method setKey [line 83]

void setKey( $key)



Parameters:

   $key  

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:58 +0100 by phpDocumentor 1.4.3