PHP Класс phpseclib\Crypt\Blowfish

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

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

Свойство Тип Описание
$bctx array Holds the expanded key [p] and the key-depended s-boxes [sb]
$block_size integer Block Length of the cipher
$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
$parray array P-Array consists of 18 32-bit subkeys
$sbox0 array S-Box 0
$sbox1 array S-Box 1
$sbox2 array S-Box 2
$sbox3 array S-Box 3

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

Метод Описание
__construct ( integer $mode ) Default Constructor.
_decryptBlock ( string $in ) : string Decrypts a block
_encryptBlock ( string $in ) : string Encrypts a block
_setupInlineCrypt ( ) Setup the performance-optimized function for de/encrypt()
_setupKey ( ) Setup the key (expansion)
isValidEngine ( integer $engine ) : boolean Test for engine validity
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

_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 ( )

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

This is mainly just a wrapper to set things up for \phpseclib\Crypt\Common\SymmetricKey::isValidEngine()
См. также: phpseclib\Crypt\Common\SymmetricKey::isValidEngine()
public isValidEngine ( integer $engine ) : boolean
$engine integer
Результат boolean

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

Key lengths can be between 32 and 448 bits.
public setKeyLength ( integer $length )
$length integer

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

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

Holds the expanded key [p] and the key-depended s-boxes [sb]
public array $bctx
Результат array

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

Block Length of the cipher
См. также: phpseclib\Crypt\Common\SymmetricKey::block_size
public int $block_size
Результат integer

$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)
См. также: phpseclib\Crypt\Common\SymmetricKey::setKeyLength()
public int $key_length
Результат integer

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

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

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

P-Array consists of 18 32-bit subkeys
public array $parray
Результат array

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

S-Box 0
public array $sbox0
Результат array

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

S-Box 1
public array $sbox1
Результат array

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

S-Box 2
public array $sbox2
Результат array

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

S-Box 3
public array $sbox3
Результат array