PHP 클래스 phpseclib\Crypt\Rijndael

저자: Jim Wigginton ([email protected])
상속: extends phpseclib\Crypt\Base
파일 보기 프로젝트 열기: phpseclib/phpseclib 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$Nb integer The Block Length divided by 32
$Nk integer The Key Length divided by 32
$Nr integer The Number of Rounds
$c array Shift offsets
$cipher_name_mcrypt string Mcrypt is useable for 128/192/256-bit $block_size/$key_length. For 160/224 not. \phpseclib\Crypt\Rijndael determines automatically whether mcrypt is useable or not for the current $block_size/$key_length. In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly.
$dw array The Inverse Key Schedule
$key_length integer The Key Length (in bytes)
$kl array Holds the last used key- and block_size information
$password_default_salt string The default salt used by setPassword()
$w array The Key Schedule

공개 메소드들

메소드 설명
__construct ( integer $mode ) Default Constructor.
_decryptBlock ( string $in ) : string Decrypts a block
_encryptBlock ( string $in ) : string Encrypts a block
_getInvTables ( ) : array Provides the inverse mixColumns and inverse sboxes tables
_getTables ( ) : array Provides the mixColumns and sboxes tables
_setupInlineCrypt ( ) Setup the performance-optimized function for de/encrypt()
_setupKey ( ) Setup the key (expansion)
_subWord ( integer $word ) Performs S-Box substitutions
isValidEngine ( integer $engine ) : boolean Test for engine validity
setBlockLength ( integer $length ) Sets the block length
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

_getInvTables() 공개 메소드

Provides the inverse mixColumns and inverse sboxes tables
또한 보기: self::_decryptBlock()
또한 보기: self::_setupInlineCrypt()
또한 보기: self::_setupKey()
public _getInvTables ( ) : array
리턴 array &$tables

_getTables() 공개 메소드

Provides the mixColumns and sboxes tables
또한 보기: self::_encryptBlock()
또한 보기: self::_setupInlineCrypt()
또한 보기: self::_subWord()
public _getTables ( ) : array
리턴 array &$tables

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

_subWord() 공개 메소드

Performs S-Box substitutions
public _subWord ( integer $word )
$word integer

isValidEngine() 공개 메소드

This is mainly just a wrapper to set things up for \phpseclib\Crypt\Common\SymmetricKey::isValidEngine()
또한 보기: phpseclib\Crypt\Common\SymmetricKey::__construct()
public isValidEngine ( integer $engine ) : boolean
$engine integer
리턴 boolean

setBlockLength() 공개 메소드

Valid block lengths are 128, 160, 192, 224, and 256.
public setBlockLength ( integer $length )
$length integer

setKey() 공개 메소드

Rijndael supports five different key lengths
또한 보기: setKeyLength()
public setKey ( string $key )
$key string

setKeyLength() 공개 메소드

Valid key lengths are 128, 160, 192, 224, and 256. Note: phpseclib extends Rijndael (and AES) for using 160- and 224-bit keys but they are officially not defined and the most (if not all) implementations are not able using 160/224-bit keys but round/pad them up to 192/256 bits as, for example, mcrypt will do. That said, if you want be compatible with other Rijndael and AES implementations, you should not setKeyLength(160) or setKeyLength(224). Additional: In case of 160- and 224-bit keys, phpseclib will/can, for that reason, not use the mcrypt php extension, even if available. This results then in slower encryption.
public setKeyLength ( integer $length )
$length integer

프로퍼티 상세

$Nb 공개적으로 프로퍼티

The Block Length divided by 32
또한 보기: self::setBlockLength()
public int $Nb
리턴 integer

$Nk 공개적으로 프로퍼티

The Key Length divided by 32
또한 보기: self::setKeyLength()
public int $Nk
리턴 integer

$Nr 공개적으로 프로퍼티

The Number of Rounds
public int $Nr
리턴 integer

$c 공개적으로 프로퍼티

Shift offsets
public array $c
리턴 array

$cipher_name_mcrypt 공개적으로 프로퍼티

Mcrypt is useable for 128/192/256-bit $block_size/$key_length. For 160/224 not. \phpseclib\Crypt\Rijndael determines automatically whether mcrypt is useable or not for the current $block_size/$key_length. In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly.
또한 보기: phpseclib\Crypt\Common\SymmetricKey::cipher_name_mcrypt
또한 보기: phpseclib\Crypt\Common\SymmetricKey::engine
또한 보기: self::isValidEngine()
public string $cipher_name_mcrypt
리턴 string

$dw 공개적으로 프로퍼티

The Inverse Key Schedule
또한 보기: self::_setup()
public array $dw
리턴 array

$key_length 공개적으로 프로퍼티

The Key Length (in bytes)
또한 보기: self::setKeyLength()
public int $key_length
리턴 integer

$kl 공개적으로 프로퍼티

Holds the last used key- and block_size information
public array $kl
리턴 array

$password_default_salt 공개적으로 프로퍼티

The default salt used by setPassword()
또한 보기: phpseclib\Crypt\Common\SymmetricKey::password_default_salt
또한 보기: phpseclib\Crypt\Common\SymmetricKey::setPassword()
public string $password_default_salt
리턴 string

$w 공개적으로 프로퍼티

The Key Schedule
또한 보기: self::_setup()
public array $w
리턴 array