Class XFCrypt_ARC4

Description

This class implements the stream cipher RC4 - see http://en.wikipedia.org/wiki/RC4 The length of s-box is full 256-bit.

Located in /lb_private/class.crypt.php (line 29)


	
			
Variable Summary
string $key
integer $pl
array $sbox
Method Summary
boolean benchmark ([integer $length = 65535])
string decrypt (string $text)
string encrypt (string $text)
void permutate_sbox ()
boolean set_key (string $key)
Variables
string $key = '' (line 37)
  • var: key
  • access: protected
integer $pl = 256 (line 41)
  • var: permutation length in bits
  • access: protected
array $sbox = array() (line 33)
  • var: s-box
  • access: protected
Methods
benchmark (line 112)

benchmark implementation

  • since: 1.0.0
  • access: public
boolean benchmark ([integer $length = 65535])
  • integer $length: length of test string
check_implementation (line 96)

checks whether implementation works correct

  • since: 1.0.0
  • access: public
boolean check_implementation ()
decrypt (line 87)

decrypts stream using prior set key

  • since: 1.0.0
string decrypt (string $text)
  • string $text: input stream
encrypt (line 64)

encrypts stream using the prior set key

  • since: 1.0.0
  • access: public
string encrypt (string $text)
  • string $text: input stream
permutate_sbox (line 137)

permutate s-box before cipher run

  • since: 1.0.0
  • access: protected
void permutate_sbox ()
set_key (line 49)

set a key

  • since: 1.0.0
  • access: public
boolean set_key (string $key)
  • string $key: the key

Documentation generated on Sat, 20 Jun 2009 12:43:01 +0200 by phpDocumentor 1.4.1