PHP Class phpseclib\Crypt\Twofish

Author: Jim Wigginton ([email protected])
Author: Hans-Juergen Petrich ([email protected])
Inheritance: extends phpseclib\Crypt\Common\BlockCipher
Afficher le fichier Open project: phpseclib/phpseclib Class Usage Examples

Méthodes publiques

Свойство Type Description
$K array The Key Schedule Array
$S0 array The Key depended S-Table 0
$S1 array The Key depended S-Table 1
$S2 array The Key depended S-Table 2
$S3 array The Key depended S-Table 3
$cfb_init_len integer Optimizing value while CFB-encrypting
$cipher_name_mcrypt string The mcrypt specific name of the cipher
$key_length integer The Key Length (in bytes)
$kl array Holds the last used key
$m0 array M-Table
$m1 array M-Table
$m2 array M-Table
$m3 array M-Table
$q0 array Q-Table
$q1 array Q-Table

Méthodes publiques

Méthode Description
__construct ( integer $mode ) Default Constructor.
_decryptBlock ( string $in ) : string Decrypts a block
_encryptBlock ( string $in ) : string Encrypts a block
_mdsrem ( string $A, string $B ) : array _mdsrem function using by the twofish cipher algorithm
_setupInlineCrypt ( ) Setup the performance-optimized function for de/encrypt()
_setupKey ( ) Setup the key (expansion)
setKey ( string $key ) Sets the key.
setKeyLength ( integer $length ) Sets the key length.

Method Details

__construct() public méthode

Default Constructor.
public __construct ( integer $mode )
$mode integer

_decryptBlock() public méthode

Decrypts a block
public _decryptBlock ( string $in ) : string
$in string
Résultat string

_encryptBlock() public méthode

Encrypts a block
public _encryptBlock ( string $in ) : string
$in string
Résultat string

_mdsrem() public méthode

_mdsrem function using by the twofish cipher algorithm
public _mdsrem ( string $A, string $B ) : array
$A string
$B string
Résultat array

_setupInlineCrypt() public méthode

Setup the performance-optimized function for de/encrypt()
See also: phpseclib\Crypt\Common\SymmetricKey::_setupInlineCrypt()
public _setupInlineCrypt ( )

_setupKey() public méthode

Setup the key (expansion)
See also: phpseclib\Crypt\Common\SymmetricKey::_setupKey()
public _setupKey ( )

setKey() public méthode

Rijndael supports five different key lengths
See also: setKeyLength()
public setKey ( string $key )
$key string

setKeyLength() public méthode

Valid key lengths are 128, 192 or 256 bits
public setKeyLength ( integer $length )
$length integer

Property Details

$K public_oe property

The Key Schedule Array
public array $K
Résultat array

$S0 public_oe property

The Key depended S-Table 0
public array $S0
Résultat array

$S1 public_oe property

The Key depended S-Table 1
public array $S1
Résultat array

$S2 public_oe property

The Key depended S-Table 2
public array $S2
Résultat array

$S3 public_oe property

The Key depended S-Table 3
public array $S3
Résultat array

$cfb_init_len public_oe property

Optimizing value while CFB-encrypting
See also: phpseclib\Crypt\Common\SymmetricKey::cfb_init_len
public int $cfb_init_len
Résultat integer

$cipher_name_mcrypt public_oe property

The mcrypt specific name of the cipher
See also: phpseclib\Crypt\Common\SymmetricKey::cipher_name_mcrypt
public string $cipher_name_mcrypt
Résultat string

$key_length public_oe property

The Key Length (in bytes)
See also: Crypt_Twofish::setKeyLength()
public int $key_length
Résultat integer

$kl public_oe property

Holds the last used key
public array $kl
Résultat array

$m0 public_oe property

M-Table
public array $m0
Résultat array

$m1 public_oe property

M-Table
public array $m1
Résultat array

$m2 public_oe property

M-Table
public array $m2
Résultat array

$m3 public_oe property

M-Table
public array $m3
Résultat array

$q0 public_oe property

Q-Table
public array $q0
Résultat array

$q1 public_oe property

Q-Table
public array $q1
Résultat array