PHP Class Dcrypt\Rc4

Datei anzeigen Open project: dopecode/dcrypt Class Usage Examples

Public Methods

Method Description
crypt ( string $str, string $key ) : string Perform (en/de)cryption

Protected Methods

Method Description
initializeState ( string $key ) : array Create the initial byte matrix that will be used for swaps. This code is identical between RC4 and Spritz.

Method Details

crypt() public static method

Perform (en/de)cryption
public static crypt ( string $str, string $key ) : string
$str string String to be encrypted
$key string Key to use for encryption
return string

initializeState() protected static method

Create the initial byte matrix that will be used for swaps. This code is identical between RC4 and Spritz.
protected static initializeState ( string $key ) : array
$key string
return array