|
XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
| _blowfish_crypt (&$Xl, &$Xr) | |
| _blowfish_decrypt (&$Xl, &$Xr) | |
| _decrypt ($block) | |
| _encrypt ($block) | |
| _F ($x) | |
| _init ($key) | |
| pcrypt_blowfish ($key) | |
Public Attributes | |
| $blocksize = 8 | |
| $parray | |
| $sbox0 | |
| $sbox1 | |
| $sbox2 | |
| $sbox3 | |
Class Blowfish extends PCrypt Class This class is a implementation of the Blowfish Crypt Algorithm to use with PCrypt Class. Based on Bruce Schneier Code in Applied Cryptography Book
Definition at line 43 of file blowfish.php.
| pcrypt_blowfish::_blowfish_crypt | ( | & | $Xl, |
| & | $Xr | ||
| ) |
This functions encrypt the block.
private
| int | $Xl | left uInt32 part of the block |
| int | $Xr | right uInt32 part of the block |
Definition at line 281 of file blowfish.php.
Referenced by _encrypt(), and _init().


| pcrypt_blowfish::_blowfish_decrypt | ( | & | $Xl, |
| & | $Xr | ||
| ) |
This method decrypt the block.
private
| int | $Xl | left uInt32 part of the block |
| int | $Xr | right uInt32 part of the block |
Definition at line 310 of file blowfish.php.
Referenced by _decrypt().


| pcrypt_blowfish::_decrypt | ( | $block | ) |
This method is called by pcrypt class.
This method decrypt the cipher block and return the new.
public
| string | $block | the encrypted block to be decrypted |
Definition at line 433 of file blowfish.php.
References $data, and _blowfish_decrypt().

| pcrypt_blowfish::_encrypt | ( | $block | ) |
This method is called by pcrypt class.
This method encrypt the block and return the new block.
public
| string | $block | the block to be encrypted |
Definition at line 414 of file blowfish.php.
References $data, and _blowfish_crypt().

| pcrypt_blowfish::_F | ( | $x | ) |
The F function defined in Blowfish paper.
Divide the block in 4 parts and execute the function
private
| int | $x | the block |
Definition at line 340 of file blowfish.php.
Referenced by _blowfish_crypt(), and _blowfish_decrypt().

| pcrypt_blowfish::_init | ( | $key | ) |
This function initialize the subkeys.
public
| string | $key | the key used to encrypt and decrypt |
Definition at line 363 of file blowfish.php.
References $data, $i, and _blowfish_crypt().
Referenced by pcrypt_blowfish().


| pcrypt_blowfish::pcrypt_blowfish | ( | $key | ) |
Methods The Constructor of the class.
This class make a copy of the $sboxs and $parray and init the subkeys.
public
| string | $key | the key used to encrypt and decrypt |
Definition at line 265 of file blowfish.php.
References _init().

| int pcrypt_blowfish::$blocksize = 8 |
| array pcrypt_blowfish::$parray |
P-Array consists of 18 32-bit subkeys
private
Definition at line 243 of file blowfish.php.
| pcrypt_blowfish::$sbox0 |
Definition at line 56 of file blowfish.php.
| pcrypt_blowfish::$sbox1 |
Definition at line 102 of file blowfish.php.
| pcrypt_blowfish::$sbox2 |
Definition at line 147 of file blowfish.php.
| pcrypt_blowfish::$sbox3 |
Definition at line 192 of file blowfish.php.