PHP Class Dcrypt\Rc4

Afficher le fichier Open project: dopecode/dcrypt Class Usage Examples

Méthodes publiques

Méthode Description
crypt ( string $str, string $key ) : string Perform (en/de)cryption

Méthodes protégées

Méthode 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 méthode

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
Résultat string

initializeState() protected static méthode

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
Résultat array