PHP 클래스 phpseclib\Crypt\RC4

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

공개 프로퍼티들

프로퍼티 타입 설명
$block_size integer RC4 is a stream cipher so we the block_size to 0
$cipher_name_mcrypt string The mcrypt specific name of the cipher
$key string The Key
$key_length integer Key Length (in bytes)
$stream array The Key Stream for decryption and encryption
$use_inline_crypt mixed Holds whether performance-optimized $inline_crypt() can/should be used.

공개 메소드들

메소드 설명
__construct ( ) : RC4 Default Constructor.
_crypt ( string $text, integer $mode ) : string Encrypts or decrypts a message.
_decryptBlock ( string $in ) Decrypts a block
_encryptBlock ( string $in ) Encrypts a block
_setupKey ( ) Setup the key (expansion)
decrypt ( string $ciphertext ) : string Decrypts a message.
encrypt ( string $plaintext ) : string Encrypts a message.
isValidEngine ( integer $engine ) : boolean Test for engine validity
setKey ( $key ) Sets the key length
setKeyLength ( integer $length ) Sets the key length
usesIV ( ) : boolean RC4 does not use an IV

메소드 상세

__construct() 공개 메소드

Default Constructor.
또한 보기: phpseclib\Crypt\Common\SymmetricKey::__construct()
public __construct ( ) : RC4
리턴 RC4

_crypt() 공개 메소드

Encrypts or decrypts a message.
또한 보기: self::encrypt()
또한 보기: self::decrypt()
public _crypt ( string $text, integer $mode ) : string
$text string
$mode integer
리턴 string $text

_decryptBlock() 공개 메소드

Decrypts a block
public _decryptBlock ( string $in )
$in string

_encryptBlock() 공개 메소드

Encrypts a block
public _encryptBlock ( string $in )
$in string

_setupKey() 공개 메소드

Setup the key (expansion)
또한 보기: phpseclib\Crypt\Common\SymmetricKey::_setupKey()
public _setupKey ( )

decrypt() 공개 메소드

$this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)). At least if the continuous buffer is disabled.
또한 보기: phpseclib\Crypt\Common\SymmetricKey::encrypt()
또한 보기: self::_crypt()
public decrypt ( string $ciphertext ) : string
$ciphertext string
리턴 string $plaintext

encrypt() 공개 메소드

Encrypts a message.
또한 보기: phpseclib\Crypt\Common\SymmetricKey::decrypt()
또한 보기: self::_crypt()
public encrypt ( string $plaintext ) : string
$plaintext string
리턴 string $ciphertext

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

setKey() 공개 메소드

Keys can be between 1 and 256 bytes long.
public setKey ( $key )

setKeyLength() 공개 메소드

Keys can be between 1 and 256 bytes long.
public setKeyLength ( integer $length )
$length integer

usesIV() 공개 메소드

RC4 does not use an IV
public usesIV ( ) : boolean
리턴 boolean

프로퍼티 상세

$block_size 공개적으로 프로퍼티

RC4 is a stream cipher so we the block_size to 0
또한 보기: phpseclib\Crypt\Common\SymmetricKey::block_size
public int $block_size
리턴 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 공개적으로 프로퍼티

The Key
또한 보기: self::setKey()
public string $key
리턴 string

$key_length 공개적으로 프로퍼티

Key Length (in bytes)
또한 보기: phpseclib\Crypt\RC4::setKeyLength()
public int $key_length
리턴 integer

$stream 공개적으로 프로퍼티

The Key Stream for decryption and encryption
또한 보기: self::setKey()
public array $stream
리턴 array

$use_inline_crypt 공개적으로 프로퍼티

Holds whether performance-optimized $inline_crypt() can/should be used.
또한 보기: phpseclib\Crypt\Common\SymmetricKey::inline_crypt
public mixed $use_inline_crypt
리턴 mixed