PHP Класс phpseclib\Crypt\Twofish

Автор: Jim Wigginton ([email protected])
Автор: Hans-Juergen Petrich ([email protected])
Наследование: extends phpseclib\Crypt\Common\BlockCipher
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

_decryptBlock() публичный Метод

Decrypts a block
public _decryptBlock ( string $in ) : string
$in string
Результат string

_encryptBlock() публичный Метод

Encrypts a block
public _encryptBlock ( string $in ) : string
$in string
Результат string

_mdsrem() публичный Метод

_mdsrem function using by the twofish cipher algorithm
public _mdsrem ( string $A, string $B ) : array
$A string
$B string
Результат array

_setupInlineCrypt() публичный Метод

Setup the performance-optimized function for de/encrypt()
См. также: phpseclib\Crypt\Common\SymmetricKey::_setupInlineCrypt()
public _setupInlineCrypt ( )

_setupKey() публичный Метод

Setup the key (expansion)
См. также: phpseclib\Crypt\Common\SymmetricKey::_setupKey()
public _setupKey ( )

setKey() публичный Метод

Rijndael supports five different key lengths
См. также: setKeyLength()
public setKey ( string $key )
$key string

setKeyLength() публичный Метод

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

Описание свойств

$K публичное свойство

The Key Schedule Array
public array $K
Результат array

$S0 публичное свойство

The Key depended S-Table 0
public array $S0
Результат array

$S1 публичное свойство

The Key depended S-Table 1
public array $S1
Результат array

$S2 публичное свойство

The Key depended S-Table 2
public array $S2
Результат array

$S3 публичное свойство

The Key depended S-Table 3
public array $S3
Результат array

$cfb_init_len публичное свойство

Optimizing value while CFB-encrypting
См. также: phpseclib\Crypt\Common\SymmetricKey::cfb_init_len
public int $cfb_init_len
Результат integer

$cipher_name_mcrypt публичное свойство

The mcrypt specific name of the cipher
См. также: phpseclib\Crypt\Common\SymmetricKey::cipher_name_mcrypt
public string $cipher_name_mcrypt
Результат string

$key_length публичное свойство

The Key Length (in bytes)
См. также: Crypt_Twofish::setKeyLength()
public int $key_length
Результат integer

$kl публичное свойство

Holds the last used key
public array $kl
Результат array

$m0 публичное свойство

M-Table
public array $m0
Результат array

$m1 публичное свойство

M-Table
public array $m1
Результат array

$m2 публичное свойство

M-Table
public array $m2
Результат array

$m3 публичное свойство

M-Table
public array $m3
Результат array

$q0 публичное свойство

Q-Table
public array $q0
Результат array

$q1 публичное свойство

Q-Table
public array $q1
Результат array