mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00:00
Merge branch 'master' into rsa-plugins
Conflicts: phpseclib/Crypt/RSA.php
This commit is contained in:
commit
a9705fdba7
@ -11,13 +11,13 @@
|
|||||||
* just a wrapper to Rijndael.php you may consider using Rijndael.php instead of
|
* just a wrapper to Rijndael.php you may consider using Rijndael.php instead of
|
||||||
* to save one include_once().
|
* to save one include_once().
|
||||||
*
|
*
|
||||||
* If {@link \phpseclib\Crypt\AES::setKeyLength() setKeyLength()} isn't called, it'll be calculated from
|
* If {@link self::setKeyLength() setKeyLength()} isn't called, it'll be calculated from
|
||||||
* {@link \phpseclib\Crypt\AES::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's 136-bits
|
* {@link self::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's 136-bits
|
||||||
* it'll be null-padded to 192-bits and 192 bits will be the key length until {@link \phpseclib\Crypt\AES::setKey() setKey()}
|
* it'll be null-padded to 192-bits and 192 bits will be the key length until {@link self::setKey() setKey()}
|
||||||
* is called, again, at which point, it'll be recalculated.
|
* is called, again, at which point, it'll be recalculated.
|
||||||
*
|
*
|
||||||
* Since \phpseclib\Crypt\AES extends \phpseclib\Crypt\Rijndael, some functions are available to be called that, in the context of AES, don't
|
* Since \phpseclib\Crypt\AES extends \phpseclib\Crypt\Rijndael, some functions are available to be called that, in the context of AES, don't
|
||||||
* make a whole lot of sense. {@link \phpseclib\Crypt\AES::setBlockLength() setBlockLength()}, for instance. Calling that function,
|
* make a whole lot of sense. {@link self::setBlockLength() setBlockLength()}, for instance. Calling that function,
|
||||||
* however possible, won't do anything (AES has a fixed block length whereas Rijndael has a variable one).
|
* however possible, won't do anything (AES has a fixed block length whereas Rijndael has a variable one).
|
||||||
*
|
*
|
||||||
* Here's a short example of how to use this library:
|
* Here's a short example of how to use this library:
|
||||||
@ -114,13 +114,13 @@ class AES extends Rijndael
|
|||||||
$length = strlen($key);
|
$length = strlen($key);
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $length <= 16:
|
case $length <= 16:
|
||||||
$this->key_size = 16;
|
$this->key_length = 16;
|
||||||
break;
|
break;
|
||||||
case $length <= 24:
|
case $length <= 24:
|
||||||
$this->key_size = 24;
|
$this->key_length = 24;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->key_size = 32;
|
$this->key_length = 32;
|
||||||
}
|
}
|
||||||
$this->_setEngine();
|
$this->_setEngine();
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* The Encryption Mode
|
* The Encryption Mode
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::__construct()
|
* @see self::__construct()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -137,7 +137,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* The Key
|
* The Key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::setKey()
|
* @see self::setKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -146,7 +146,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* The Initialization Vector
|
* The Initialization Vector
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::setIV()
|
* @see self::setIV()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -155,8 +155,8 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* A "sliding" Initialization Vector
|
* A "sliding" Initialization Vector
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::enableContinuousBuffer()
|
* @see self::enableContinuousBuffer()
|
||||||
* @see \phpseclib\Crypt\Base::_clearBuffers()
|
* @see self::_clearBuffers()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -165,8 +165,8 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* A "sliding" Initialization Vector
|
* A "sliding" Initialization Vector
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::enableContinuousBuffer()
|
* @see self::enableContinuousBuffer()
|
||||||
* @see \phpseclib\Crypt\Base::_clearBuffers()
|
* @see self::_clearBuffers()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -175,7 +175,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Continuous Buffer status
|
* Continuous Buffer status
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::enableContinuousBuffer()
|
* @see self::enableContinuousBuffer()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -184,8 +184,8 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Encryption buffer for CTR, OFB and CFB modes
|
* Encryption buffer for CTR, OFB and CFB modes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\Base::_clearBuffers()
|
* @see self::_clearBuffers()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -194,8 +194,8 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Decryption buffer for CTR, OFB and CFB modes
|
* Decryption buffer for CTR, OFB and CFB modes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @see \phpseclib\Crypt\Base::_clearBuffers()
|
* @see self::_clearBuffers()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -207,7 +207,7 @@ abstract class Base
|
|||||||
* The mcrypt resource can be recreated every time something needs to be created or it can be created just once.
|
* The mcrypt resource can be recreated every time something needs to be created or it can be created just once.
|
||||||
* Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.
|
* Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @var resource
|
* @var resource
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -219,7 +219,7 @@ abstract class Base
|
|||||||
* The mcrypt resource can be recreated every time something needs to be created or it can be created just once.
|
* The mcrypt resource can be recreated every time something needs to be created or it can be created just once.
|
||||||
* Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.
|
* Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @var resource
|
* @var resource
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -256,9 +256,9 @@ abstract class Base
|
|||||||
* use a separate ECB-mode mcrypt resource.
|
* use a separate ECB-mode mcrypt resource.
|
||||||
*
|
*
|
||||||
* @link http://phpseclib.sourceforge.net/cfb-demo.phps
|
* @link http://phpseclib.sourceforge.net/cfb-demo.phps
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @see \phpseclib\Crypt\Base::_setupMcrypt()
|
* @see self::_setupMcrypt()
|
||||||
* @var resource
|
* @var resource
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -280,7 +280,7 @@ abstract class Base
|
|||||||
* which, typically, depends on the complexity
|
* which, typically, depends on the complexity
|
||||||
* on its internaly Key-expanding algorithm.
|
* on its internaly Key-expanding algorithm.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -289,9 +289,9 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Does internal cipher state need to be (re)initialized?
|
* Does internal cipher state need to be (re)initialized?
|
||||||
*
|
*
|
||||||
* @see setKey()
|
* @see self::setKey()
|
||||||
* @see setIV()
|
* @see self::setIV()
|
||||||
* @see disableContinuousBuffer()
|
* @see self::disableContinuousBuffer()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -300,7 +300,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Padding status
|
* Padding status
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::enablePadding()
|
* @see self::enablePadding()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -309,7 +309,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Is the mode one that is paddable?
|
* Is the mode one that is paddable?
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::__construct()
|
* @see self::__construct()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -324,9 +324,9 @@ abstract class Base
|
|||||||
* - self::ENGINE_MCRYPT (fast, php-extension: mcrypt, extension_loaded('mcrypt') required)
|
* - self::ENGINE_MCRYPT (fast, php-extension: mcrypt, extension_loaded('mcrypt') required)
|
||||||
* - self::ENGINE_INTERNAL (slower, pure php-engine, no php-extension required)
|
* - self::ENGINE_INTERNAL (slower, pure php-engine, no php-extension required)
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_setEngine()
|
* @see self::_setEngine()
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -335,8 +335,8 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Holds the preferred crypt engine
|
* Holds the preferred crypt engine
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_setEngine()
|
* @see self::_setEngine()
|
||||||
* @see \phpseclib\Crypt\Base::setPreferredEngine()
|
* @see self::setPreferredEngine()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -349,7 +349,7 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* @link http://www.php.net/mcrypt_module_open
|
* @link http://www.php.net/mcrypt_module_open
|
||||||
* @link http://www.php.net/mcrypt_list_algorithms
|
* @link http://www.php.net/mcrypt_list_algorithms
|
||||||
* @see \phpseclib\Crypt\Base::_setupMcrypt()
|
* @see self::_setupMcrypt()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -358,7 +358,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* The openssl specific name of the cipher
|
* The openssl specific name of the cipher
|
||||||
*
|
*
|
||||||
* Only used if $engine == CRYPT_ENGINE_OPENSSL
|
* Only used if $engine == self::ENGINE_OPENSSL
|
||||||
*
|
*
|
||||||
* @link http://www.php.net/openssl-get-cipher-methods
|
* @link http://www.php.net/openssl-get-cipher-methods
|
||||||
* @var string
|
* @var string
|
||||||
@ -378,19 +378,10 @@ abstract class Base
|
|||||||
*/
|
*/
|
||||||
var $cipher_name_openssl_ecb;
|
var $cipher_name_openssl_ecb;
|
||||||
|
|
||||||
/**
|
|
||||||
* The default password key_size used by setPassword()
|
|
||||||
*
|
|
||||||
* @see \phpseclib\Crypt\Base::setPassword()
|
|
||||||
* @var int
|
|
||||||
* @access private
|
|
||||||
*/
|
|
||||||
var $password_key_size = 32;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default salt used by setPassword()
|
* The default salt used by setPassword()
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::setPassword()
|
* @see self::setPassword()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -402,10 +393,10 @@ abstract class Base
|
|||||||
* Used by encrypt() / decrypt()
|
* Used by encrypt() / decrypt()
|
||||||
* only if $engine == self::ENGINE_INTERNAL
|
* only if $engine == self::ENGINE_INTERNAL
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @see \phpseclib\Crypt\Base::_setupInlineCrypt()
|
* @see self::_setupInlineCrypt()
|
||||||
* @see \phpseclib\Crypt\Base::$use_inline_crypt
|
* @see self::$use_inline_crypt
|
||||||
* @var Callback
|
* @var Callback
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -414,9 +405,9 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Holds whether performance-optimized $inline_crypt() can/should be used.
|
* Holds whether performance-optimized $inline_crypt() can/should be used.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @see \phpseclib\Crypt\Base::inline_crypt
|
* @see self::inline_crypt
|
||||||
* @var mixed
|
* @var mixed
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -425,7 +416,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* If OpenSSL can be used in ECB but not in CTR we can emulate CTR
|
* If OpenSSL can be used in ECB but not in CTR we can emulate CTR
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_openssl_ctr_process()
|
* @see self::_openssl_ctr_process()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -434,7 +425,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Determines what options are passed to openssl_encrypt/decrypt
|
* Determines what options are passed to openssl_encrypt/decrypt
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::isValidEngine()
|
* @see self::isValidEngine()
|
||||||
* @var mixed
|
* @var mixed
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -443,7 +434,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Has the key length explicitly been set or should it be derived from the key, itself?
|
* Has the key length explicitly been set or should it be derived from the key, itself?
|
||||||
*
|
*
|
||||||
* @see setKeyLength()
|
* @see self::setKeyLength()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -452,7 +443,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Don't truncate / null pad key
|
* Don't truncate / null pad key
|
||||||
*
|
*
|
||||||
* @see Crypt_Base::_clearBuffers
|
* @see self::_clearBuffers()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -475,8 +466,6 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* - self::MODE_OFB
|
* - self::MODE_OFB
|
||||||
*
|
*
|
||||||
* (or the alias constants of the chosen cipher, for example for AES: CRYPT_AES_MODE_ECB or CRYPT_AES_MODE_CBC ...)
|
|
||||||
*
|
|
||||||
* If not explicitly set, self::MODE_CBC will be used.
|
* If not explicitly set, self::MODE_CBC will be used.
|
||||||
*
|
*
|
||||||
* @param int $mode
|
* @param int $mode
|
||||||
@ -553,7 +542,7 @@ abstract class Base
|
|||||||
*/
|
*/
|
||||||
function getKeyLength()
|
function getKeyLength()
|
||||||
{
|
{
|
||||||
return $this->key_size << 3;
|
return $this->key_length << 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -632,7 +621,7 @@ abstract class Base
|
|||||||
if (isset($func_args[5])) {
|
if (isset($func_args[5])) {
|
||||||
$dkLen = $func_args[5];
|
$dkLen = $func_args[5];
|
||||||
} else {
|
} else {
|
||||||
$dkLen = $method == 'pbkdf1' ? 2 * $this->key_size : $this->key_size;
|
$dkLen = $method == 'pbkdf1' ? 2 * $this->key_length : $this->key_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
@ -694,7 +683,7 @@ abstract class Base
|
|||||||
* strlen($plaintext) will still need to be a multiple of the block size, however, arbitrary values can be added to make it that
|
* strlen($plaintext) will still need to be a multiple of the block size, however, arbitrary values can be added to make it that
|
||||||
* length.
|
* length.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $plaintext
|
* @param string $plaintext
|
||||||
* @return string $ciphertext
|
* @return string $ciphertext
|
||||||
@ -992,7 +981,7 @@ abstract class Base
|
|||||||
* If strlen($ciphertext) is not a multiple of the block size, null bytes will be added to the end of the string until
|
* If strlen($ciphertext) is not a multiple of the block size, null bytes will be added to the end of the string until
|
||||||
* it is.
|
* it is.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $ciphertext
|
* @param string $ciphertext
|
||||||
* @return string $plaintext
|
* @return string $plaintext
|
||||||
@ -1279,12 +1268,12 @@ abstract class Base
|
|||||||
* OpenSSL CTR Processor
|
* OpenSSL CTR Processor
|
||||||
*
|
*
|
||||||
* PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream
|
* PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream
|
||||||
* for CTR is the same for both encrypting and decrypting this function is re-used by both Crypt_Base::encrypt()
|
* for CTR is the same for both encrypting and decrypting this function is re-used by both Base::encrypt()
|
||||||
* and Crypt_Base::decrypt(). Also, OpenSSL doesn't implement CTR for all of it's symmetric ciphers so this
|
* and Base::decrypt(). Also, OpenSSL doesn't implement CTR for all of it's symmetric ciphers so this
|
||||||
* function will emulate CTR with ECB when necesary.
|
* function will emulate CTR with ECB when necesary.
|
||||||
*
|
*
|
||||||
* @see Crypt_Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see Crypt_Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @param string $plaintext
|
* @param string $plaintext
|
||||||
* @param string $encryptIV
|
* @param string $encryptIV
|
||||||
* @param array $buffer
|
* @param array $buffer
|
||||||
@ -1374,11 +1363,11 @@ abstract class Base
|
|||||||
* OpenSSL OFB Processor
|
* OpenSSL OFB Processor
|
||||||
*
|
*
|
||||||
* PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream
|
* PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream
|
||||||
* for OFB is the same for both encrypting and decrypting this function is re-used by both Crypt_Base::encrypt()
|
* for OFB is the same for both encrypting and decrypting this function is re-used by both Base::encrypt()
|
||||||
* and Crypt_Base::decrypt().
|
* and Base::decrypt().
|
||||||
*
|
*
|
||||||
* @see Crypt_Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see Crypt_Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @param string $plaintext
|
* @param string $plaintext
|
||||||
* @param string $encryptIV
|
* @param string $encryptIV
|
||||||
* @param array $buffer
|
* @param array $buffer
|
||||||
@ -1459,7 +1448,7 @@ abstract class Base
|
|||||||
* away characters that shouldn't be stripped away. (SSH knows how many bytes are added because the length is
|
* away characters that shouldn't be stripped away. (SSH knows how many bytes are added because the length is
|
||||||
* transmitted separately)
|
* transmitted separately)
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::disablePadding()
|
* @see self::disablePadding()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function enablePadding()
|
function enablePadding()
|
||||||
@ -1470,7 +1459,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Do not pad packets.
|
* Do not pad packets.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::enablePadding()
|
* @see self::enablePadding()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function disablePadding()
|
function disablePadding()
|
||||||
@ -1512,7 +1501,7 @@ abstract class Base
|
|||||||
* continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them),
|
* continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them),
|
||||||
* however, they are also less intuitive and more likely to cause you problems.
|
* however, they are also less intuitive and more likely to cause you problems.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::disableContinuousBuffer()
|
* @see self::disableContinuousBuffer()
|
||||||
* @access public
|
* @access public
|
||||||
* @internal Could, but not must, extend by the child Crypt_* class
|
* @internal Could, but not must, extend by the child Crypt_* class
|
||||||
*/
|
*/
|
||||||
@ -1532,7 +1521,7 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* The default behavior.
|
* The default behavior.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::enableContinuousBuffer()
|
* @see self::enableContinuousBuffer()
|
||||||
* @access public
|
* @access public
|
||||||
* @internal Could, but not must, extend by the child Crypt_* class
|
* @internal Could, but not must, extend by the child Crypt_* class
|
||||||
*/
|
*/
|
||||||
@ -1554,7 +1543,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Test for engine validity
|
* Test for engine validity
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::Crypt_Base()
|
* @see self::__construct()
|
||||||
* @param int $engine
|
* @param int $engine
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -1621,7 +1610,7 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* If the preferred crypt engine is not available the fastest available one will be used
|
* If the preferred crypt engine is not available the fastest available one will be used
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::Crypt_Base()
|
* @see self::__construct()
|
||||||
* @param int $engine
|
* @param int $engine
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
@ -1643,7 +1632,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Returns the engine currently being utilized
|
* Returns the engine currently being utilized
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_setEngine()
|
* @see self::_setEngine()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function getEngine()
|
function getEngine()
|
||||||
@ -1654,7 +1643,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Sets the engine as appropriate
|
* Sets the engine as appropriate
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::Crypt_Base()
|
* @see self::__construct()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _setEngine()
|
function _setEngine()
|
||||||
@ -1722,7 +1711,7 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* Note: Must extend by the child \phpseclib\Crypt\* class
|
* Note: Must extend by the child \phpseclib\Crypt\* class
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_setup()
|
* @see self::_setup()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
abstract function _setupKey();
|
abstract function _setupKey();
|
||||||
@ -1744,9 +1733,9 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* - First run of encrypt() / decrypt() with no init-settings
|
* - First run of encrypt() / decrypt() with no init-settings
|
||||||
*
|
*
|
||||||
* @see setKey()
|
* @see self::setKey()
|
||||||
* @see setIV()
|
* @see self::setIV()
|
||||||
* @see disableContinuousBuffer()
|
* @see self::disableContinuousBuffer()
|
||||||
* @access private
|
* @access private
|
||||||
* @internal _setup() is always called before en/decryption.
|
* @internal _setup() is always called before en/decryption.
|
||||||
* @internal Could, but not must, extend by the child Crypt_* class
|
* @internal Could, but not must, extend by the child Crypt_* class
|
||||||
@ -1778,9 +1767,9 @@ abstract class Base
|
|||||||
*
|
*
|
||||||
* - First run of encrypt() / decrypt()
|
* - First run of encrypt() / decrypt()
|
||||||
*
|
*
|
||||||
* @see setKey()
|
* @see self::setKey()
|
||||||
* @see setIV()
|
* @see self::setIV()
|
||||||
* @see disableContinuousBuffer()
|
* @see self::disableContinuousBuffer()
|
||||||
* @access private
|
* @access private
|
||||||
* @internal Could, but not must, extend by the child Crypt_* class
|
* @internal Could, but not must, extend by the child Crypt_* class
|
||||||
*/
|
*/
|
||||||
@ -1825,7 +1814,7 @@ abstract class Base
|
|||||||
* If padding is disabled and $text is not a multiple of the blocksize, the string will be padded regardless
|
* If padding is disabled and $text is not a multiple of the blocksize, the string will be padded regardless
|
||||||
* and padding will, hence forth, be enabled.
|
* and padding will, hence forth, be enabled.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_unpad()
|
* @see self::_unpad()
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @throws \LengthException if padding is disabled and the plaintext's length is not a multiple of the block size
|
* @throws \LengthException if padding is disabled and the plaintext's length is not a multiple of the block size
|
||||||
* @access private
|
* @access private
|
||||||
@ -1854,7 +1843,7 @@ abstract class Base
|
|||||||
* If padding is enabled and the reported padding length is invalid the encryption key will be assumed to be wrong
|
* If padding is enabled and the reported padding length is invalid the encryption key will be assumed to be wrong
|
||||||
* and false will be returned.
|
* and false will be returned.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_pad()
|
* @see self::_pad()
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @throws \LengthException if the ciphertext's length is not a multiple of the block size
|
* @throws \LengthException if the ciphertext's length is not a multiple of the block size
|
||||||
* @access private
|
* @access private
|
||||||
@ -1894,7 +1883,7 @@ abstract class Base
|
|||||||
$this->encryptIV = $this->decryptIV = str_pad(substr($this->iv, 0, $this->block_size), $this->block_size, "\0");
|
$this->encryptIV = $this->decryptIV = str_pad(substr($this->iv, 0, $this->block_size), $this->block_size, "\0");
|
||||||
|
|
||||||
if (!$this->skip_key_adjustment) {
|
if (!$this->skip_key_adjustment) {
|
||||||
$this->key = str_pad(substr($this->key, 0, $this->key_size), $this->key_size, "\0");
|
$this->key = str_pad(substr($this->key, 0, $this->key_length), $this->key_length, "\0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1935,8 +1924,8 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Increment the current string
|
* Increment the current string
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @param string $var
|
* @param string $var
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -2022,10 +2011,10 @@ abstract class Base
|
|||||||
* - The callback function should not use the 'return' statement, but en/decrypt'ing the content of $in only
|
* - The callback function should not use the 'return' statement, but en/decrypt'ing the content of $in only
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_setup()
|
* @see self::_setup()
|
||||||
* @see \phpseclib\Crypt\Base::_createInlineCryptFunction()
|
* @see self::_createInlineCryptFunction()
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @access private
|
* @access private
|
||||||
* @internal If a Crypt_* class providing inline crypting it must extend _setupInlineCrypt()
|
* @internal If a Crypt_* class providing inline crypting it must extend _setupInlineCrypt()
|
||||||
*/
|
*/
|
||||||
@ -2144,9 +2133,9 @@ abstract class Base
|
|||||||
* );
|
* );
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_setupInlineCrypt()
|
* @see self::_setupInlineCrypt()
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see self::decrypt()
|
||||||
* @param array $cipher_code
|
* @param array $cipher_code
|
||||||
* @access private
|
* @access private
|
||||||
* @return string (the name of the created callback function)
|
* @return string (the name of the created callback function)
|
||||||
@ -2527,7 +2516,7 @@ abstract class Base
|
|||||||
/**
|
/**
|
||||||
* Generates a digest from $bytes
|
* Generates a digest from $bytes
|
||||||
*
|
*
|
||||||
* @see _setupInlineCrypt()
|
* @see self::_setupInlineCrypt()
|
||||||
* @access private
|
* @access private
|
||||||
* @param $bytes
|
* @param $bytes
|
||||||
* @return string
|
* @return string
|
||||||
|
@ -273,17 +273,17 @@ class Blowfish extends Base
|
|||||||
var $kl;
|
var $kl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Key Length
|
* The Key Length (in bytes)
|
||||||
*
|
*
|
||||||
* @see setKeyLength()
|
* @see \phpseclib\Crypt\Base::setKeyLength()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
* @internal The max value is 256 / 8 = 32, the min value is 128 / 8 = 16. Exists in conjunction with $Nk
|
* @internal The max value is 256 / 8 = 32, the min value is 128 / 8 = 16. Exists in conjunction with $Nk
|
||||||
* because the encryption / decryption / key schedule creation requires this number and not $key_size. We could
|
* because the encryption / decryption / key schedule creation requires this number and not $key_length. We could
|
||||||
* derive this from $key_size or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu
|
* derive this from $key_length or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu
|
||||||
* of that, we'll just precompute it once.
|
* of that, we'll just precompute it once.
|
||||||
*/
|
*/
|
||||||
var $key_size = 16;
|
var $key_length = 16;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the key length.
|
* Sets the key length.
|
||||||
@ -296,11 +296,11 @@ class Blowfish extends Base
|
|||||||
function setKeyLength($length)
|
function setKeyLength($length)
|
||||||
{
|
{
|
||||||
if ($length < 32) {
|
if ($length < 32) {
|
||||||
$this->key_size = 7;
|
$this->key_length = 7;
|
||||||
} elseif ($length > 448) {
|
} elseif ($length > 448) {
|
||||||
$this->key_size = 56;
|
$this->key_length = 56;
|
||||||
} else {
|
} else {
|
||||||
$this->key_size = $length >> 3;
|
$this->key_length = $length >> 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::setKeyLength($length);
|
parent::setKeyLength($length);
|
||||||
@ -319,7 +319,7 @@ class Blowfish extends Base
|
|||||||
function isValidEngine($engine)
|
function isValidEngine($engine)
|
||||||
{
|
{
|
||||||
if ($engine == self::ENGINE_OPENSSL) {
|
if ($engine == self::ENGINE_OPENSSL) {
|
||||||
if ($this->key_size != 16) {
|
if ($this->key_length != 16) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->cipher_name_openssl_ecb = 'bf-ecb';
|
$this->cipher_name_openssl_ecb = 'bf-ecb';
|
||||||
@ -467,7 +467,7 @@ class Blowfish extends Base
|
|||||||
$lambda_functions =& self::_getLambdaFunctions();
|
$lambda_functions =& self::_getLambdaFunctions();
|
||||||
|
|
||||||
// We create max. 10 hi-optimized code for memory reason. Means: For each $key one ultra fast inline-crypt function.
|
// We create max. 10 hi-optimized code for memory reason. Means: For each $key one ultra fast inline-crypt function.
|
||||||
// (Currently, for Crypt_Blowfish, one generated $lambda_function cost on php5.5@32bit ~100kb unfreeable mem and ~180kb on php5.5@64bit)
|
// (Currently, for Blowfish, one generated $lambda_function cost on php5.5@32bit ~100kb unfreeable mem and ~180kb on php5.5@64bit)
|
||||||
// After that, we'll still create very fast optimized code but not the hi-ultimative code, for each $mode one.
|
// After that, we'll still create very fast optimized code but not the hi-ultimative code, for each $mode one.
|
||||||
$gen_hi_opt_code = (bool)(count($lambda_functions) < 10);
|
$gen_hi_opt_code = (bool)(count($lambda_functions) < 10);
|
||||||
|
|
||||||
|
@ -78,13 +78,13 @@ class DES extends Base
|
|||||||
var $block_size = 8;
|
var $block_size = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Key Length
|
* Key Length (in bytes)
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::setKeyLength()
|
* @see \phpseclib\Crypt\Base::setKeyLength()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $key_size = 8;
|
var $key_length = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mcrypt specific name of the cipher
|
* The mcrypt specific name of the cipher
|
||||||
@ -124,8 +124,8 @@ class DES extends Base
|
|||||||
*
|
*
|
||||||
* Used only if $engine == self::ENGINE_INTERNAL
|
* Used only if $engine == self::ENGINE_INTERNAL
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\DES::_setupKey()
|
* @see self::_setupKey()
|
||||||
* @see \phpseclib\Crypt\DES::_processBlock()
|
* @see self::_processBlock()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -134,16 +134,16 @@ class DES extends Base
|
|||||||
/**
|
/**
|
||||||
* max possible size of $key
|
* max possible size of $key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\DES::setKey()
|
* @see self::setKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $key_size_max = 8;
|
var $key_length_max = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Key Schedule
|
* The Key Schedule
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\DES::_setupKey()
|
* @see self::_setupKey()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -156,8 +156,8 @@ class DES extends Base
|
|||||||
* with each byte containing all bits in the same state as the
|
* with each byte containing all bits in the same state as the
|
||||||
* corresponding bit in the index value.
|
* corresponding bit in the index value.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\DES::_processBlock()
|
* @see self::_processBlock()
|
||||||
* @see \phpseclib\Crypt\DES::_setupKey()
|
* @see self::_setupKey()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -592,7 +592,7 @@ class DES extends Base
|
|||||||
*/
|
*/
|
||||||
function isValidEngine($engine)
|
function isValidEngine($engine)
|
||||||
{
|
{
|
||||||
if ($this->key_size_max == 8) {
|
if ($this->key_length_max == 8) {
|
||||||
if ($engine == self::ENGINE_OPENSSL) {
|
if ($engine == self::ENGINE_OPENSSL) {
|
||||||
$this->cipher_name_openssl_ecb = 'des-ecb';
|
$this->cipher_name_openssl_ecb = 'des-ecb';
|
||||||
$this->cipher_name_openssl = 'des-' . $this->_openssl_translate_mode();
|
$this->cipher_name_openssl = 'des-' . $this->_openssl_translate_mode();
|
||||||
@ -621,8 +621,8 @@ class DES extends Base
|
|||||||
{
|
{
|
||||||
// We check/cut here only up to max length of the key.
|
// We check/cut here only up to max length of the key.
|
||||||
// Key padding to the proper length will be done in _setupKey()
|
// Key padding to the proper length will be done in _setupKey()
|
||||||
if (strlen($key) > $this->key_size_max) {
|
if (strlen($key) > $this->key_length_max) {
|
||||||
$key = substr($key, 0, $this->key_size_max);
|
$key = substr($key, 0, $this->key_length_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the key
|
// Sets the key
|
||||||
@ -634,7 +634,7 @@ class DES extends Base
|
|||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_encryptBlock()
|
* @see \phpseclib\Crypt\Base::_encryptBlock()
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see \phpseclib\Crypt\Base::encrypt()
|
||||||
* @see \phpseclib\Crypt\DES::encrypt()
|
* @see self::encrypt()
|
||||||
* @access private
|
* @access private
|
||||||
* @param string $in
|
* @param string $in
|
||||||
* @return string
|
* @return string
|
||||||
@ -649,7 +649,7 @@ class DES extends Base
|
|||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_decryptBlock()
|
* @see \phpseclib\Crypt\Base::_decryptBlock()
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see \phpseclib\Crypt\Base::decrypt()
|
||||||
* @see \phpseclib\Crypt\DES::decrypt()
|
* @see self::decrypt()
|
||||||
* @access private
|
* @access private
|
||||||
* @param string $in
|
* @param string $in
|
||||||
* @return string
|
* @return string
|
||||||
@ -666,8 +666,8 @@ class DES extends Base
|
|||||||
* {@link http://en.wikipedia.org/wiki/Image:Feistel.png Feistel.png} to get a general
|
* {@link http://en.wikipedia.org/wiki/Image:Feistel.png Feistel.png} to get a general
|
||||||
* idea of what this function does.
|
* idea of what this function does.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\DES::_encryptBlock()
|
* @see self::_encryptBlock()
|
||||||
* @see \phpseclib\Crypt\DES::_decryptBlock()
|
* @see self::_decryptBlock()
|
||||||
* @access private
|
* @access private
|
||||||
* @param string $block
|
* @param string $block
|
||||||
* @param int $mode
|
* @param int $mode
|
||||||
@ -1299,8 +1299,8 @@ class DES extends Base
|
|||||||
$des_rounds = $this->des_rounds;
|
$des_rounds = $this->des_rounds;
|
||||||
|
|
||||||
// We create max. 10 hi-optimized code for memory reason. Means: For each $key one ultra fast inline-crypt function.
|
// We create max. 10 hi-optimized code for memory reason. Means: For each $key one ultra fast inline-crypt function.
|
||||||
// (Currently, for Crypt_DES, one generated $lambda_function cost on php5.5@32bit ~135kb unfreeable mem and ~230kb on php5.5@64bit)
|
// (Currently, for DES, one generated $lambda_function cost on php5.5@32bit ~135kb unfreeable mem and ~230kb on php5.5@64bit)
|
||||||
// (Currently, for Crypt_TripleDES, one generated $lambda_function cost on php5.5@32bit ~240kb unfreeable mem and ~340kb on php5.5@64bit)
|
// (Currently, for TripleDES, one generated $lambda_function cost on php5.5@32bit ~240kb unfreeable mem and ~340kb on php5.5@64bit)
|
||||||
// After that, we'll still create very fast optimized code but not the hi-ultimative code, for each $mode one
|
// After that, we'll still create very fast optimized code but not the hi-ultimative code, for each $mode one
|
||||||
$gen_hi_opt_code = (bool)( count($lambda_functions) < 10 );
|
$gen_hi_opt_code = (bool)( count($lambda_functions) < 10 );
|
||||||
|
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
* such as sha256-96. Any hash algorithm returned by hash_algos() (and
|
* such as sha256-96. Any hash algorithm returned by hash_algos() (and
|
||||||
* truncated versions thereof) are supported.
|
* truncated versions thereof) are supported.
|
||||||
*
|
*
|
||||||
* If {@link \phpseclib\Crypt\Hash::setKey() setKey()} is called,
|
* If {@link self::setKey() setKey()} is called, {@link self::hash() hash()} will
|
||||||
* {@link \phpseclib\Crypt\Hash::hash() hash()} will return the HMAC as opposed
|
* return the HMAC as opposed to the hash.
|
||||||
* to the hash.
|
|
||||||
*
|
*
|
||||||
* Here's a short example of how to use this library:
|
* Here's a short example of how to use this library:
|
||||||
* <code>
|
* <code>
|
||||||
@ -47,7 +46,7 @@ class Hash
|
|||||||
/**
|
/**
|
||||||
* Hash Parameter
|
* Hash Parameter
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Hash::setHash()
|
* @see self::setHash()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -56,7 +55,7 @@ class Hash
|
|||||||
/**
|
/**
|
||||||
* Byte-length of hash output (Internal HMAC)
|
* Byte-length of hash output (Internal HMAC)
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Hash::setHash()
|
* @see self::setHash()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -65,7 +64,7 @@ class Hash
|
|||||||
/**
|
/**
|
||||||
* Hash Algorithm
|
* Hash Algorithm
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Hash::setHash()
|
* @see self::setHash()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -74,7 +73,7 @@ class Hash
|
|||||||
/**
|
/**
|
||||||
* Key
|
* Key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Hash::setKey()
|
* @see self::setKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
|
@ -58,7 +58,7 @@ class RC2 extends Base
|
|||||||
* The Key
|
* The Key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::key
|
* @see \phpseclib\Crypt\Base::key
|
||||||
* @see setKey()
|
* @see self::setKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -68,9 +68,9 @@ class RC2 extends Base
|
|||||||
* The Original (unpadded) Key
|
* The Original (unpadded) Key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::key
|
* @see \phpseclib\Crypt\Base::key
|
||||||
* @see setKey()
|
* @see self::setKey()
|
||||||
* @see encrypt()
|
* @see self::encrypt()
|
||||||
* @see decrypt()
|
* @see self::decrypt()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -79,20 +79,20 @@ class RC2 extends Base
|
|||||||
/**
|
/**
|
||||||
* Don't truncate / null pad key
|
* Don't truncate / null pad key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::_clearBuffers
|
* @see \phpseclib\Crypt\Base::_clearBuffers()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $skip_key_adjustment = true;
|
var $skip_key_adjustment = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Key Length
|
* Key Length (in bytes)
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC2::setKeyLength()
|
* @see \phpseclib\Crypt\RC2::setKeyLength()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $key_size = 16; // = 128 bits
|
var $key_length = 16; // = 128 bits
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mcrypt specific name of the cipher
|
* The mcrypt specific name of the cipher
|
||||||
@ -115,8 +115,8 @@ class RC2 extends Base
|
|||||||
/**
|
/**
|
||||||
* The key length in bits.
|
* The key length in bits.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC2::setKeyLength()
|
* @see self::setKeyLength()
|
||||||
* @see \phpseclib\Crypt\RC2::setKey()
|
* @see self::setKey()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
* @internal Should be in range [1..1024].
|
* @internal Should be in range [1..1024].
|
||||||
@ -127,8 +127,8 @@ class RC2 extends Base
|
|||||||
/**
|
/**
|
||||||
* The key length in bits.
|
* The key length in bits.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC2::isValidEnine()
|
* @see self::isValidEnine()
|
||||||
* @see \phpseclib\Crypt\RC2::setKey()
|
* @see self::setKey()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
* @internal Should be in range [1..1024].
|
* @internal Should be in range [1..1024].
|
||||||
@ -138,7 +138,7 @@ class RC2 extends Base
|
|||||||
/**
|
/**
|
||||||
* The Key Schedule
|
* The Key Schedule
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC2::_setupKey()
|
* @see self::_setupKey()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -148,7 +148,7 @@ class RC2 extends Base
|
|||||||
* Key expansion randomization table.
|
* Key expansion randomization table.
|
||||||
* Twice the same 256-value sequence to save a modulus in key expansion.
|
* Twice the same 256-value sequence to save a modulus in key expansion.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC2::setKey()
|
* @see self::setKey()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -222,7 +222,7 @@ class RC2 extends Base
|
|||||||
/**
|
/**
|
||||||
* Inverse key expansion randomization table.
|
* Inverse key expansion randomization table.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC2::setKey()
|
* @see self::setKey()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -377,7 +377,7 @@ class RC2 extends Base
|
|||||||
*
|
*
|
||||||
* Mostly a wrapper for \phpseclib\Crypt\Base::encrypt, with some additional OpenSSL handling code
|
* Mostly a wrapper for \phpseclib\Crypt\Base::encrypt, with some additional OpenSSL handling code
|
||||||
*
|
*
|
||||||
* @see decrypt()
|
* @see self::decrypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $plaintext
|
* @param string $plaintext
|
||||||
* @return string $ciphertext
|
* @return string $ciphertext
|
||||||
@ -400,7 +400,7 @@ class RC2 extends Base
|
|||||||
*
|
*
|
||||||
* Mostly a wrapper for \phpseclib\Crypt\Base::decrypt, with some additional OpenSSL handling code
|
* Mostly a wrapper for \phpseclib\Crypt\Base::decrypt, with some additional OpenSSL handling code
|
||||||
*
|
*
|
||||||
* @see encrypt()
|
* @see self::encrypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $ciphertext
|
* @param string $ciphertext
|
||||||
* @return string $plaintext
|
* @return string $plaintext
|
||||||
|
@ -76,13 +76,13 @@ class RC4 extends Base
|
|||||||
var $block_size = 0;
|
var $block_size = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Key Length
|
* Key Length (in bytes)
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC4::setKeyLength()
|
* @see \phpseclib\Crypt\RC4::setKeyLength()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $key_size = 128; // = 1024 bits
|
var $key_length = 128; // = 1024 bits
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mcrypt specific name of the cipher
|
* The mcrypt specific name of the cipher
|
||||||
@ -105,7 +105,7 @@ class RC4 extends Base
|
|||||||
/**
|
/**
|
||||||
* The Key
|
* The Key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC4::setKey()
|
* @see self::setKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -114,7 +114,7 @@ class RC4 extends Base
|
|||||||
/**
|
/**
|
||||||
* The Key Stream for decryption and encryption
|
* The Key Stream for decryption and encryption
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC4::setKey()
|
* @see self::setKey()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -182,7 +182,7 @@ class RC4 extends Base
|
|||||||
* {@link http://en.wikipedia.org/wiki/Related_key_attack http://en.wikipedia.org/wiki/Related_key_attack}
|
* {@link http://en.wikipedia.org/wiki/Related_key_attack http://en.wikipedia.org/wiki/Related_key_attack}
|
||||||
*
|
*
|
||||||
* @param string $iv
|
* @param string $iv
|
||||||
* @see \phpseclib\Crypt\RC4::setKey()
|
* @see self::setKey()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function setIV($iv)
|
function setIV($iv)
|
||||||
@ -200,11 +200,11 @@ class RC4 extends Base
|
|||||||
function setKeyLength($length)
|
function setKeyLength($length)
|
||||||
{
|
{
|
||||||
if ($length < 8) {
|
if ($length < 8) {
|
||||||
$this->key_size = 1;
|
$this->key_length = 1;
|
||||||
} elseif ($length > 2048) {
|
} elseif ($length > 2048) {
|
||||||
$this->key_size = 248;
|
$this->key_length = 248;
|
||||||
} else {
|
} else {
|
||||||
$this->key_size = $length >> 3;
|
$this->key_length = $length >> 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::setKeyLength($length);
|
parent::setKeyLength($length);
|
||||||
@ -214,7 +214,7 @@ class RC4 extends Base
|
|||||||
* Encrypts a message.
|
* Encrypts a message.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::decrypt()
|
* @see \phpseclib\Crypt\Base::decrypt()
|
||||||
* @see \phpseclib\Crypt\RC4::_crypt()
|
* @see self::_crypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $plaintext
|
* @param string $plaintext
|
||||||
* @return string $ciphertext
|
* @return string $ciphertext
|
||||||
@ -234,7 +234,7 @@ class RC4 extends Base
|
|||||||
* At least if the continuous buffer is disabled.
|
* At least if the continuous buffer is disabled.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::encrypt()
|
* @see \phpseclib\Crypt\Base::encrypt()
|
||||||
* @see \phpseclib\Crypt\RC4::_crypt()
|
* @see self::_crypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $ciphertext
|
* @param string $ciphertext
|
||||||
* @return string $plaintext
|
* @return string $plaintext
|
||||||
@ -299,8 +299,8 @@ class RC4 extends Base
|
|||||||
/**
|
/**
|
||||||
* Encrypts or decrypts a message.
|
* Encrypts or decrypts a message.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RC4::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\RC4::decrypt()
|
* @see self::decrypt()
|
||||||
* @access private
|
* @access private
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @param int $mode
|
* @param int $mode
|
||||||
|
@ -60,8 +60,8 @@ class RSA
|
|||||||
{
|
{
|
||||||
/**#@+
|
/**#@+
|
||||||
* @access public
|
* @access public
|
||||||
* @see \phpseclib\Crypt\RSA::encrypt()
|
* @see self::encrypt()
|
||||||
* @see \phpseclib\Crypt\RSA::decrypt()
|
* @see self::decrypt()
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Use {@link http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding Optimal Asymmetric Encryption Padding}
|
* Use {@link http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding Optimal Asymmetric Encryption Padding}
|
||||||
@ -69,8 +69,8 @@ class RSA
|
|||||||
*
|
*
|
||||||
* Uses sha1 by default.
|
* Uses sha1 by default.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RSA::setHash()
|
* @see self::setHash()
|
||||||
* @see \phpseclib\Crypt\RSA::setMGFHash()
|
* @see self::setMGFHash()
|
||||||
*/
|
*/
|
||||||
const ENCRYPTION_OAEP = 1;
|
const ENCRYPTION_OAEP = 1;
|
||||||
/**
|
/**
|
||||||
@ -91,17 +91,17 @@ class RSA
|
|||||||
|
|
||||||
/**#@+
|
/**#@+
|
||||||
* @access public
|
* @access public
|
||||||
* @see \phpseclib\Crypt\RSA::sign()
|
* @see self::sign()
|
||||||
* @see \phpseclib\Crypt\RSA::verify()
|
* @see self::verify()
|
||||||
* @see \phpseclib\Crypt\RSA::setHash()
|
* @see self::setHash()
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Use the Probabilistic Signature Scheme for signing
|
* Use the Probabilistic Signature Scheme for signing
|
||||||
*
|
*
|
||||||
* Uses sha1 by default.
|
* Uses sha1 by default.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RSA::setSaltLength()
|
* @see self::setSaltLength()
|
||||||
* @see \phpseclib\Crypt\RSA::setMGFHash()
|
* @see self::setMGFHash()
|
||||||
*/
|
*/
|
||||||
const SIGNATURE_PSS = 1;
|
const SIGNATURE_PSS = 1;
|
||||||
/**
|
/**
|
||||||
@ -115,7 +115,7 @@ class RSA
|
|||||||
|
|
||||||
/**#@+
|
/**#@+
|
||||||
* @access private
|
* @access private
|
||||||
* @see \phpseclib\Crypt\RSA::createKey()
|
* @see self::createKey()
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* ASN1 Integer
|
* ASN1 Integer
|
||||||
@ -141,7 +141,7 @@ class RSA
|
|||||||
|
|
||||||
/**#@+
|
/**#@+
|
||||||
* @access private
|
* @access private
|
||||||
* @see \phpseclib\Crypt\RSA::__construct()
|
* @see self::__construct()
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* To use the pure-PHP implementation
|
* To use the pure-PHP implementation
|
||||||
@ -320,7 +320,7 @@ class RSA
|
|||||||
*
|
*
|
||||||
* Set to null to use system configuration file.
|
* Set to null to use system configuration file.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RSA::createKey()
|
* @see self::createKey()
|
||||||
* @var mixed
|
* @var mixed
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
@ -329,7 +329,7 @@ class RSA
|
|||||||
/**
|
/**
|
||||||
* Supported file formats
|
* Supported file formats
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RSA::load()
|
* @see self::load()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -639,7 +639,7 @@ class RSA
|
|||||||
* The plugin needs to either already be loaded or be auto-loadable.
|
* The plugin needs to either already be loaded or be auto-loadable.
|
||||||
* Loading a plugin whose shortname overwrite an existing shortname will overwrite the old plugin.
|
* Loading a plugin whose shortname overwrite an existing shortname will overwrite the old plugin.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\RSA::load()
|
* @see self::load()
|
||||||
* @param string $fullname
|
* @param string $fullname
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -766,9 +766,10 @@ class RSA
|
|||||||
*
|
*
|
||||||
* The private key is only returned if the currently loaded key contains the constituent prime numbers.
|
* The private key is only returned if the currently loaded key contains the constituent prime numbers.
|
||||||
*
|
*
|
||||||
* @see getPublicKey()
|
* @see self::getPublicKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $type optional
|
* @param string $type optional
|
||||||
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
function getPrivateKey($type = 'PKCS1')
|
function getPrivateKey($type = 'PKCS1')
|
||||||
{
|
{
|
||||||
@ -811,8 +812,8 @@ class RSA
|
|||||||
* Private keys can be encrypted with a password. To unset the password, pass in the empty string or false.
|
* Private keys can be encrypted with a password. To unset the password, pass in the empty string or false.
|
||||||
* Or rather, pass in $password such that empty($password) && !is_string($password) is true.
|
* Or rather, pass in $password such that empty($password) && !is_string($password) is true.
|
||||||
*
|
*
|
||||||
* @see createKey()
|
* @see self::createKey()
|
||||||
* @see load()
|
* @see self::load()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $password
|
* @param string $password
|
||||||
*/
|
*/
|
||||||
@ -836,7 +837,7 @@ class RSA
|
|||||||
*
|
*
|
||||||
* Returns true on success, false on failure
|
* Returns true on success, false on failure
|
||||||
*
|
*
|
||||||
* @see getPublicKey()
|
* @see self::getPublicKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $key optional
|
* @param string $key optional
|
||||||
* @param int $type optional
|
* @param int $type optional
|
||||||
@ -906,7 +907,7 @@ class RSA
|
|||||||
*
|
*
|
||||||
* Returns true on success, false on failure
|
* Returns true on success, false on failure
|
||||||
*
|
*
|
||||||
* @see getPublicKey()
|
* @see self::getPublicKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $key optional
|
* @param string $key optional
|
||||||
* @param int $type optional
|
* @param int $type optional
|
||||||
@ -937,9 +938,10 @@ class RSA
|
|||||||
* or if the public key was set via setPublicKey(). If the currently loaded key is supposed to be the public key this
|
* or if the public key was set via setPublicKey(). If the currently loaded key is supposed to be the public key this
|
||||||
* function won't return it since this library, for the most part, doesn't distinguish between public and private keys.
|
* function won't return it since this library, for the most part, doesn't distinguish between public and private keys.
|
||||||
*
|
*
|
||||||
* @see getPrivateKey()
|
* @see self::getPrivateKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $type optional
|
* @param string $type optional
|
||||||
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
function getPublicKey($type = 'PKCS8')
|
function getPublicKey($type = 'PKCS8')
|
||||||
{
|
{
|
||||||
@ -973,6 +975,7 @@ class RSA
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $algorithm The hashing algorithm to be used. Valid options are 'md5' and 'sha256'. False is returned
|
* @param string $algorithm The hashing algorithm to be used. Valid options are 'md5' and 'sha256'. False is returned
|
||||||
* for invalid values.
|
* for invalid values.
|
||||||
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getPublicKeyFingerprint($algorithm = 'md5')
|
public function getPublicKeyFingerprint($algorithm = 'md5')
|
||||||
{
|
{
|
||||||
@ -1003,7 +1006,7 @@ class RSA
|
|||||||
* Returns the private key without the prime number constituants. Structurally identical to a public key that
|
* Returns the private key without the prime number constituants. Structurally identical to a public key that
|
||||||
* hasn't been set as the public key
|
* hasn't been set as the public key
|
||||||
*
|
*
|
||||||
* @see getPrivateKey()
|
* @see self::getPrivateKey()
|
||||||
* @access private
|
* @access private
|
||||||
* @param string $type optional
|
* @param string $type optional
|
||||||
*/
|
*/
|
||||||
@ -1034,6 +1037,7 @@ class RSA
|
|||||||
* __toString() magic method
|
* __toString() magic method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
function __toString()
|
function __toString()
|
||||||
{
|
{
|
||||||
@ -1049,6 +1053,7 @@ class RSA
|
|||||||
* __clone() magic method
|
* __clone() magic method
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
|
* @return \phpseclib\Crypt\RSA
|
||||||
*/
|
*/
|
||||||
function __clone()
|
function __clone()
|
||||||
{
|
{
|
||||||
@ -1144,7 +1149,7 @@ class RSA
|
|||||||
/**
|
/**
|
||||||
* Determines the private key format
|
* Determines the private key format
|
||||||
*
|
*
|
||||||
* @see createKey()
|
* @see self::createKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param int $format
|
* @param int $format
|
||||||
*/
|
*/
|
||||||
@ -1156,7 +1161,7 @@ class RSA
|
|||||||
/**
|
/**
|
||||||
* Determines the public key format
|
* Determines the public key format
|
||||||
*
|
*
|
||||||
* @see createKey()
|
* @see self::createKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param int $format
|
* @param int $format
|
||||||
*/
|
*/
|
||||||
@ -2041,7 +2046,7 @@ class RSA
|
|||||||
* If $plaintext exceeds those limits it will be broken up so that it does and the resultant ciphertext's will
|
* If $plaintext exceeds those limits it will be broken up so that it does and the resultant ciphertext's will
|
||||||
* be concatenated together.
|
* be concatenated together.
|
||||||
*
|
*
|
||||||
* @see decrypt()
|
* @see self::decrypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $plaintext
|
* @param string $plaintext
|
||||||
* @return string
|
* @return string
|
||||||
@ -2087,7 +2092,7 @@ class RSA
|
|||||||
/**
|
/**
|
||||||
* Decryption
|
* Decryption
|
||||||
*
|
*
|
||||||
* @see encrypt()
|
* @see self::encrypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $plaintext
|
* @param string $plaintext
|
||||||
* @return string
|
* @return string
|
||||||
@ -2129,7 +2134,7 @@ class RSA
|
|||||||
/**
|
/**
|
||||||
* Create a signature
|
* Create a signature
|
||||||
*
|
*
|
||||||
* @see verify()
|
* @see self::verify()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @return string
|
* @return string
|
||||||
@ -2152,7 +2157,7 @@ class RSA
|
|||||||
/**
|
/**
|
||||||
* Verifies a signature
|
* Verifies a signature
|
||||||
*
|
*
|
||||||
* @see sign()
|
* @see self::sign()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param string $signature
|
* @param string $signature
|
||||||
@ -2172,4 +2177,4 @@ class RSA
|
|||||||
return $this->_rsassa_pss_verify($message, $signature);
|
return $this->_rsassa_pss_verify($message, $signature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -56,9 +56,10 @@ class Random
|
|||||||
{
|
{
|
||||||
if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
|
if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
|
||||||
try {
|
try {
|
||||||
return random_bytes($length);
|
return \random_bytes($length);
|
||||||
} catch (\Error $e) {
|
} catch (\Throwable $e) {
|
||||||
// If a sufficient source of randomness is unavailable, random_bytes() will emit a warning.
|
// If a sufficient source of randomness is unavailable, random_bytes() will throw an
|
||||||
|
// object that implements the Throwable interface (Exception, TypeError, Error).
|
||||||
// We don't actually need to do anything here. The string() method should just continue
|
// We don't actually need to do anything here. The string() method should just continue
|
||||||
// as normal. Note, however, that if we don't have a sufficient source of randomness for
|
// as normal. Note, however, that if we don't have a sufficient source of randomness for
|
||||||
// random_bytes(), most of the other calls here will fail too, so we'll end up using
|
// random_bytes(), most of the other calls here will fail too, so we'll end up using
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5
|
||||||
*
|
*
|
||||||
* If {@link \phpseclib\Crypt\Rijndael::setBlockLength() setBlockLength()} isn't called, it'll be assumed to be 128 bits. If
|
* If {@link self::setBlockLength() setBlockLength()} isn't called, it'll be assumed to be 128 bits. If
|
||||||
* {@link \phpseclib\Crypt\Rijndael::setKeyLength() setKeyLength()} isn't called, it'll be calculated from
|
* {@link self::setKeyLength() setKeyLength()} isn't called, it'll be calculated from
|
||||||
* {@link \phpseclib\Crypt\Rijndael::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's
|
* {@link self::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's
|
||||||
* 136-bits it'll be null-padded to 192-bits and 192 bits will be the key length until
|
* 136-bits it'll be null-padded to 192-bits and 192 bits will be the key length until
|
||||||
* {@link \phpseclib\Crypt\Rijndael::setKey() setKey()} is called, again, at which point, it'll be recalculated.
|
* {@link self::setKey() setKey()} is called, again, at which point, it'll be recalculated.
|
||||||
*
|
*
|
||||||
* Not all Rijndael implementations may support 160-bits or 224-bits as the block length / key length. mcrypt, for example,
|
* Not all Rijndael implementations may support 160-bits or 224-bits as the block length / key length. mcrypt, for example,
|
||||||
* does not. AES, itself, only supports block lengths of 128 and key lengths of 128, 192, and 256.
|
* does not. AES, itself, only supports block lengths of 128 and key lengths of 128, 192, and 256.
|
||||||
@ -68,14 +68,14 @@ class Rijndael extends Base
|
|||||||
/**
|
/**
|
||||||
* The mcrypt specific name of the cipher
|
* The mcrypt specific name of the cipher
|
||||||
*
|
*
|
||||||
* Mcrypt is useable for 128/192/256-bit $block_size/$key_size. For 160/224 not.
|
* 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
|
* \phpseclib\Crypt\Rijndael determines automatically whether mcrypt is useable
|
||||||
* or not for the current $block_size/$key_size.
|
* or not for the current $block_size/$key_length.
|
||||||
* In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly.
|
* In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::cipher_name_mcrypt
|
* @see \phpseclib\Crypt\Base::cipher_name_mcrypt
|
||||||
* @see \phpseclib\Crypt\Base::engine
|
* @see \phpseclib\Crypt\Base::engine
|
||||||
* @see isValidEngine()
|
* @see self::isValidEngine()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -94,7 +94,7 @@ class Rijndael extends Base
|
|||||||
/**
|
/**
|
||||||
* The Key Schedule
|
* The Key Schedule
|
||||||
*
|
*
|
||||||
* @see _setup()
|
* @see self::_setup()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -103,7 +103,7 @@ class Rijndael extends Base
|
|||||||
/**
|
/**
|
||||||
* The Inverse Key Schedule
|
* The Inverse Key Schedule
|
||||||
*
|
*
|
||||||
* @see _setup()
|
* @see self::_setup()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -112,7 +112,7 @@ class Rijndael extends Base
|
|||||||
/**
|
/**
|
||||||
* The Block Length divided by 32
|
* The Block Length divided by 32
|
||||||
*
|
*
|
||||||
* @see setBlockLength()
|
* @see self::setBlockLength()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
* @internal The max value is 256 / 32 = 8, the min value is 128 / 32 = 4. Exists in conjunction with $block_size
|
* @internal The max value is 256 / 32 = 8, the min value is 128 / 32 = 4. Exists in conjunction with $block_size
|
||||||
@ -123,22 +123,22 @@ class Rijndael extends Base
|
|||||||
var $Nb = 4;
|
var $Nb = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Key Length
|
* The Key Length (in bytes)
|
||||||
*
|
*
|
||||||
* @see setKeyLength()
|
* @see self::setKeyLength()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
* @internal The max value is 256 / 8 = 32, the min value is 128 / 8 = 16. Exists in conjunction with $Nk
|
* @internal The max value is 256 / 8 = 32, the min value is 128 / 8 = 16. Exists in conjunction with $Nk
|
||||||
* because the encryption / decryption / key schedule creation requires this number and not $key_size. We could
|
* because the encryption / decryption / key schedule creation requires this number and not $key_length. We could
|
||||||
* derive this from $key_size or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu
|
* derive this from $key_length or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu
|
||||||
* of that, we'll just precompute it once.
|
* of that, we'll just precompute it once.
|
||||||
*/
|
*/
|
||||||
var $key_size = 16;
|
var $key_length = 16;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Key Length divided by 32
|
* The Key Length divided by 32
|
||||||
*
|
*
|
||||||
* @see setKeyLength()
|
* @see self::setKeyLength()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
* @internal The max value is 256 / 32 = 8, the min value is 128 / 32 = 4
|
* @internal The max value is 256 / 32 = 8, the min value is 128 / 32 = 4
|
||||||
@ -194,19 +194,19 @@ class Rijndael extends Base
|
|||||||
{
|
{
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $length <= 128:
|
case $length <= 128:
|
||||||
$this->key_size = 16;
|
$this->key_length = 16;
|
||||||
break;
|
break;
|
||||||
case $length <= 160:
|
case $length <= 160:
|
||||||
$this->key_size = 20;
|
$this->key_length = 20;
|
||||||
break;
|
break;
|
||||||
case $length <= 192:
|
case $length <= 192:
|
||||||
$this->key_size = 24;
|
$this->key_length = 24;
|
||||||
break;
|
break;
|
||||||
case $length <= 224:
|
case $length <= 224:
|
||||||
$this->key_size = 28;
|
$this->key_length = 28;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->key_size = 32;
|
$this->key_length = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::setKeyLength($length);
|
parent::setKeyLength($length);
|
||||||
@ -252,12 +252,12 @@ class Rijndael extends Base
|
|||||||
if ($this->block_size != 16) {
|
if ($this->block_size != 16) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->cipher_name_openssl_ecb = 'aes-' . ($this->key_size << 3) . '-ecb';
|
$this->cipher_name_openssl_ecb = 'aes-' . ($this->key_length << 3) . '-ecb';
|
||||||
$this->cipher_name_openssl = 'aes-' . ($this->key_size << 3) . '-' . $this->_openssl_translate_mode();
|
$this->cipher_name_openssl = 'aes-' . ($this->key_length << 3) . '-' . $this->_openssl_translate_mode();
|
||||||
break;
|
break;
|
||||||
case self::ENGINE_MCRYPT:
|
case self::ENGINE_MCRYPT:
|
||||||
$this->cipher_name_mcrypt = 'rijndael-' . ($this->block_size << 3);
|
$this->cipher_name_mcrypt = 'rijndael-' . ($this->block_size << 3);
|
||||||
if ($this->key_size % 8) { // is it a 160/224-bit key?
|
if ($this->key_length % 8) { // is it a 160/224-bit key?
|
||||||
// mcrypt is not usable for them, only for 128/192/256-bit keys
|
// mcrypt is not usable for them, only for 128/192/256-bit keys
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -476,13 +476,13 @@ class Rijndael extends Base
|
|||||||
0x7D000000, 0xFA000000, 0xEF000000, 0xC5000000, 0x91000000
|
0x7D000000, 0xFA000000, 0xEF000000, 0xC5000000, 0x91000000
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($this->kl['key']) && $this->key === $this->kl['key'] && $this->key_size === $this->kl['key_size'] && $this->block_size === $this->kl['block_size']) {
|
if (isset($this->kl['key']) && $this->key === $this->kl['key'] && $this->key_length === $this->kl['key_length'] && $this->block_size === $this->kl['block_size']) {
|
||||||
// already expanded
|
// already expanded
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->kl = array('key' => $this->key, 'key_size' => $this->key_size, 'block_size' => $this->block_size);
|
$this->kl = array('key' => $this->key, 'key_length' => $this->key_length, 'block_size' => $this->block_size);
|
||||||
|
|
||||||
$this->Nk = $this->key_size >> 2;
|
$this->Nk = $this->key_length >> 2;
|
||||||
// see Rijndael-ammended.pdf#page=44
|
// see Rijndael-ammended.pdf#page=44
|
||||||
$this->Nr = max($this->Nk, $this->Nb) + 6;
|
$this->Nr = max($this->Nk, $this->Nb) + 6;
|
||||||
|
|
||||||
@ -592,9 +592,9 @@ class Rijndael extends Base
|
|||||||
/**
|
/**
|
||||||
* Provides the mixColumns and sboxes tables
|
* Provides the mixColumns and sboxes tables
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Rijndael:_encryptBlock()
|
* @see self::_encryptBlock()
|
||||||
* @see \phpseclib\Crypt\Rijndael:_setupInlineCrypt()
|
* @see self::_setupInlineCrypt()
|
||||||
* @see \phpseclib\Crypt\Rijndael:_subWord()
|
* @see self::_subWord()
|
||||||
* @access private
|
* @access private
|
||||||
* @return array &$tables
|
* @return array &$tables
|
||||||
*/
|
*/
|
||||||
@ -681,9 +681,9 @@ class Rijndael extends Base
|
|||||||
/**
|
/**
|
||||||
* Provides the inverse mixColumns and inverse sboxes tables
|
* Provides the inverse mixColumns and inverse sboxes tables
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Rijndael:_decryptBlock()
|
* @see self::_decryptBlock()
|
||||||
* @see \phpseclib\Crypt\Rijndael:_setupInlineCrypt()
|
* @see self::_setupInlineCrypt()
|
||||||
* @see \phpseclib\Crypt\Rijndael:_setupKey()
|
* @see self::_setupKey()
|
||||||
* @access private
|
* @access private
|
||||||
* @return array &$tables
|
* @return array &$tables
|
||||||
*/
|
*/
|
||||||
|
@ -48,7 +48,6 @@ use phpseclib\Crypt\DES;
|
|||||||
*/
|
*/
|
||||||
class TripleDES extends DES
|
class TripleDES extends DES
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypt / decrypt using inner chaining
|
* Encrypt / decrypt using inner chaining
|
||||||
*
|
*
|
||||||
@ -64,13 +63,13 @@ class TripleDES extends DES
|
|||||||
const MODE_CBC3 = Base::MODE_CBC;
|
const MODE_CBC3 = Base::MODE_CBC;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Key Length
|
* Key Length (in bytes)
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\TripleDES::setKeyLength()
|
* @see \phpseclib\Crypt\TripleDES::setKeyLength()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $key_size = 24;
|
var $key_length = 24;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default salt used by setPassword()
|
* The default salt used by setPassword()
|
||||||
@ -104,12 +103,12 @@ class TripleDES extends DES
|
|||||||
/**
|
/**
|
||||||
* max possible size of $key
|
* max possible size of $key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\TripleDES::setKey()
|
* @see self::setKey()
|
||||||
* @see \phpseclib\Crypt\DES::setKey()
|
* @see \phpseclib\Crypt\DES::setKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $key_size_max = 24;
|
var $key_length_max = 24;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal flag whether using self::MODE_3CBC or not
|
* Internal flag whether using self::MODE_3CBC or not
|
||||||
@ -237,13 +236,13 @@ class TripleDES extends DES
|
|||||||
$length >>= 3;
|
$length >>= 3;
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $length <= 8:
|
case $length <= 8:
|
||||||
$this->key_size = 8;
|
$this->key_length = 8;
|
||||||
break;
|
break;
|
||||||
case $length <= 16:
|
case $length <= 16:
|
||||||
$this->key_size = 16;
|
$this->key_length = 16;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->key_size = 24;
|
$this->key_length = 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::setKeyLength($length);
|
parent::setKeyLength($length);
|
||||||
@ -266,7 +265,7 @@ class TripleDES extends DES
|
|||||||
*/
|
*/
|
||||||
function setKey($key)
|
function setKey($key)
|
||||||
{
|
{
|
||||||
$length = $this->explicit_key_length ? $this->key_size : strlen($key);
|
$length = $this->explicit_key_length ? $this->key_length : strlen($key);
|
||||||
if ($length > 8) {
|
if ($length > 8) {
|
||||||
$key = str_pad(substr($key, 0, 24), 24, chr(0));
|
$key = str_pad(substr($key, 0, 24), 24, chr(0));
|
||||||
// if $key is between 64 and 128-bits, use the first 64-bits as the last, per this:
|
// if $key is between 64 and 128-bits, use the first 64-bits as the last, per this:
|
||||||
@ -375,7 +374,7 @@ class TripleDES extends DES
|
|||||||
* however, they are also less intuitive and more likely to cause you problems.
|
* however, they are also less intuitive and more likely to cause you problems.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::enableContinuousBuffer()
|
* @see \phpseclib\Crypt\Base::enableContinuousBuffer()
|
||||||
* @see \phpseclib\Crypt\TripleDES::disableContinuousBuffer()
|
* @see self::disableContinuousBuffer()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function enableContinuousBuffer()
|
function enableContinuousBuffer()
|
||||||
@ -394,7 +393,7 @@ class TripleDES extends DES
|
|||||||
* The default behavior.
|
* The default behavior.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Crypt\Base::disableContinuousBuffer()
|
* @see \phpseclib\Crypt\Base::disableContinuousBuffer()
|
||||||
* @see \phpseclib\Crypt\TripleDES::enableContinuousBuffer()
|
* @see self::enableContinuousBuffer()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function disableContinuousBuffer()
|
function disableContinuousBuffer()
|
||||||
|
@ -361,6 +361,15 @@ class Twofish extends Base
|
|||||||
*/
|
*/
|
||||||
var $kl;
|
var $kl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Key Length (in bytes)
|
||||||
|
*
|
||||||
|
* @see Crypt_Twofish::setKeyLength()
|
||||||
|
* @var int
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
var $key_length = 16;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the key length.
|
* Sets the key length.
|
||||||
*
|
*
|
||||||
@ -373,13 +382,13 @@ class Twofish extends Base
|
|||||||
{
|
{
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $length <= 128:
|
case $length <= 128:
|
||||||
$this->key_size = 16;
|
$this->key_length = 16;
|
||||||
break;
|
break;
|
||||||
case $length <= 192:
|
case $length <= 192:
|
||||||
$this->key_size = 24;
|
$this->key_length = 24;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->key_size = 32;
|
$this->key_length = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::setKeyLength($length);
|
parent::setKeyLength($length);
|
||||||
|
@ -124,8 +124,8 @@ class ASN1
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
* @see \phpseclib\File\ASN1::setTimeFormat()
|
* @see self::setTimeFormat()
|
||||||
* @see \phpseclib\File\ASN1::asn1map()
|
* @see self::asn1map()
|
||||||
* @link http://php.net/class.datetime
|
* @link http://php.net/class.datetime
|
||||||
*/
|
*/
|
||||||
var $encoded;
|
var $encoded;
|
||||||
@ -137,7 +137,7 @@ class ASN1
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
* @see \phpseclib\File\ASN1::_encode_der()
|
* @see self::_encode_der()
|
||||||
*/
|
*/
|
||||||
var $filters;
|
var $filters;
|
||||||
|
|
||||||
|
@ -199,17 +199,10 @@ class BigInteger
|
|||||||
*/
|
*/
|
||||||
var $is_negative = false;
|
var $is_negative = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* Random number generator function
|
|
||||||
*
|
|
||||||
* @access private
|
|
||||||
*/
|
|
||||||
var $generator = 'mt_rand';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Precision
|
* Precision
|
||||||
*
|
*
|
||||||
* @see setPrecision()
|
* @see self::setPrecision()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $precision = -1;
|
var $precision = -1;
|
||||||
@ -217,7 +210,7 @@ class BigInteger
|
|||||||
/**
|
/**
|
||||||
* Precision Bitmask
|
* Precision Bitmask
|
||||||
*
|
*
|
||||||
* @see setPrecision()
|
* @see self::setPrecision()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $bitmask = false;
|
var $bitmask = false;
|
||||||
@ -229,8 +222,8 @@ class BigInteger
|
|||||||
* a variable that'll be serializable regardless of whether or not extensions are being used. Unlike $this->value,
|
* a variable that'll be serializable regardless of whether or not extensions are being used. Unlike $this->value,
|
||||||
* however, $this->hex is only calculated when $this->__sleep() is called.
|
* however, $this->hex is only calculated when $this->__sleep() is called.
|
||||||
*
|
*
|
||||||
* @see __sleep()
|
* @see self::__sleep()
|
||||||
* @see __wakeup()
|
* @see self::__wakeup()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -729,7 +722,7 @@ class BigInteger
|
|||||||
* {@link http://php.net/language.oop5.basic#51624}
|
* {@link http://php.net/language.oop5.basic#51624}
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @see __clone()
|
* @see self::__clone()
|
||||||
* @return \phpseclib\Math\BigInteger
|
* @return \phpseclib\Math\BigInteger
|
||||||
*/
|
*/
|
||||||
function copy()
|
function copy()
|
||||||
@ -737,7 +730,6 @@ class BigInteger
|
|||||||
$temp = new static();
|
$temp = new static();
|
||||||
$temp->value = $this->value;
|
$temp->value = $this->value;
|
||||||
$temp->is_negative = $this->is_negative;
|
$temp->is_negative = $this->is_negative;
|
||||||
$temp->generator = $this->generator;
|
|
||||||
$temp->precision = $this->precision;
|
$temp->precision = $this->precision;
|
||||||
$temp->bitmask = $this->bitmask;
|
$temp->bitmask = $this->bitmask;
|
||||||
return $temp;
|
return $temp;
|
||||||
@ -766,7 +758,7 @@ class BigInteger
|
|||||||
* PHP5, call BigInteger::copy(), instead.
|
* PHP5, call BigInteger::copy(), instead.
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @see copy()
|
* @see self::copy()
|
||||||
* @return \phpseclib\Math\BigInteger
|
* @return \phpseclib\Math\BigInteger
|
||||||
*/
|
*/
|
||||||
function __clone()
|
function __clone()
|
||||||
@ -779,16 +771,13 @@ class BigInteger
|
|||||||
*
|
*
|
||||||
* Will be called, automatically, when serialize() is called on a BigInteger object.
|
* Will be called, automatically, when serialize() is called on a BigInteger object.
|
||||||
*
|
*
|
||||||
* @see __wakeup()
|
* @see self::__wakeup()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function __sleep()
|
function __sleep()
|
||||||
{
|
{
|
||||||
$this->hex = $this->toHex(true);
|
$this->hex = $this->toHex(true);
|
||||||
$vars = array('hex');
|
$vars = array('hex');
|
||||||
if ($this->generator != 'mt_rand') {
|
|
||||||
$vars[] = 'generator';
|
|
||||||
}
|
|
||||||
if ($this->precision > 0) {
|
if ($this->precision > 0) {
|
||||||
$vars[] = 'precision';
|
$vars[] = 'precision';
|
||||||
}
|
}
|
||||||
@ -800,7 +789,7 @@ class BigInteger
|
|||||||
*
|
*
|
||||||
* Will be called, automatically, when unserialize() is called on a BigInteger object.
|
* Will be called, automatically, when unserialize() is called on a BigInteger object.
|
||||||
*
|
*
|
||||||
* @see __sleep()
|
* @see self::__sleep()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function __wakeup()
|
function __wakeup()
|
||||||
@ -1856,7 +1845,7 @@ class BigInteger
|
|||||||
*
|
*
|
||||||
* For most $modes this will return the remainder.
|
* For most $modes this will return the remainder.
|
||||||
*
|
*
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @param array $n
|
* @param array $n
|
||||||
@ -1893,7 +1882,7 @@ class BigInteger
|
|||||||
/**
|
/**
|
||||||
* Modular reduction preperation
|
* Modular reduction preperation
|
||||||
*
|
*
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @param array $n
|
* @param array $n
|
||||||
@ -1911,7 +1900,7 @@ class BigInteger
|
|||||||
/**
|
/**
|
||||||
* Modular multiply
|
* Modular multiply
|
||||||
*
|
*
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @param array $y
|
* @param array $y
|
||||||
@ -1931,7 +1920,7 @@ class BigInteger
|
|||||||
/**
|
/**
|
||||||
* Modular square
|
* Modular square
|
||||||
*
|
*
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @param array $n
|
* @param array $n
|
||||||
@ -1952,7 +1941,7 @@ class BigInteger
|
|||||||
* Calculates $x%$n, where $n = 2**$e, for some $e. Since this is basically the same as doing $x & ($n-1),
|
* Calculates $x%$n, where $n = 2**$e, for some $e. Since this is basically the same as doing $x & ($n-1),
|
||||||
* we'll just use this function as a wrapper for doing that.
|
* we'll just use this function as a wrapper for doing that.
|
||||||
*
|
*
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param \phpseclib\Math\BigInteger
|
* @param \phpseclib\Math\BigInteger
|
||||||
* @return \phpseclib\Math\BigInteger
|
* @return \phpseclib\Math\BigInteger
|
||||||
@ -1982,7 +1971,7 @@ class BigInteger
|
|||||||
* (x >> 1) + (x >> 1) != x / 2 + x / 2. If x is even, they're the same, but if x is odd, they're not. See the in-line
|
* (x >> 1) + (x >> 1) != x / 2 + x / 2. If x is even, they're the same, but if x is odd, they're not. See the in-line
|
||||||
* comments for details.
|
* comments for details.
|
||||||
*
|
*
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $n
|
* @param array $n
|
||||||
* @param array $m
|
* @param array $m
|
||||||
@ -2079,7 +2068,7 @@ class BigInteger
|
|||||||
* For numbers with more than four digits BigInteger::_barrett() is faster. The difference between that and this
|
* For numbers with more than four digits BigInteger::_barrett() is faster. The difference between that and this
|
||||||
* is that this function does not fold the denominator into a smaller form.
|
* is that this function does not fold the denominator into a smaller form.
|
||||||
*
|
*
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @param array $n
|
* @param array $n
|
||||||
@ -2150,7 +2139,7 @@ class BigInteger
|
|||||||
*
|
*
|
||||||
* If you're going to be doing array_slice($product->value, 0, $stop), some cycles can be saved.
|
* If you're going to be doing array_slice($product->value, 0, $stop), some cycles can be saved.
|
||||||
*
|
*
|
||||||
* @see _regularBarrett()
|
* @see self::_regularBarrett()
|
||||||
* @param array $x_value
|
* @param array $x_value
|
||||||
* @param bool $x_negative
|
* @param bool $x_negative
|
||||||
* @param array $y_value
|
* @param array $y_value
|
||||||
@ -2231,8 +2220,8 @@ class BigInteger
|
|||||||
* improved upon (basically, by using the comba method). gcd($n, 2) must be equal to one for this function
|
* improved upon (basically, by using the comba method). gcd($n, 2) must be equal to one for this function
|
||||||
* to work correctly.
|
* to work correctly.
|
||||||
*
|
*
|
||||||
* @see _prepMontgomery()
|
* @see self::_prepMontgomery()
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @param array $n
|
* @param array $n
|
||||||
@ -2278,8 +2267,8 @@ class BigInteger
|
|||||||
* Interleaves the montgomery reduction and long multiplication algorithms together as described in
|
* Interleaves the montgomery reduction and long multiplication algorithms together as described in
|
||||||
* {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=13 HAC 14.36}
|
* {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=13 HAC 14.36}
|
||||||
*
|
*
|
||||||
* @see _prepMontgomery()
|
* @see self::_prepMontgomery()
|
||||||
* @see _montgomery()
|
* @see self::_montgomery()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @param array $y
|
* @param array $y
|
||||||
@ -2330,8 +2319,8 @@ class BigInteger
|
|||||||
/**
|
/**
|
||||||
* Prepare a number for use in Montgomery Modular Reductions
|
* Prepare a number for use in Montgomery Modular Reductions
|
||||||
*
|
*
|
||||||
* @see _montgomery()
|
* @see self::_montgomery()
|
||||||
* @see _slidingWindow()
|
* @see self::_slidingWindow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @param array $n
|
* @param array $n
|
||||||
@ -2369,7 +2358,7 @@ class BigInteger
|
|||||||
*
|
*
|
||||||
* Thanks to Pedro Gimeno Fortea for input!
|
* Thanks to Pedro Gimeno Fortea for input!
|
||||||
*
|
*
|
||||||
* @see _montgomery()
|
* @see self::_montgomery()
|
||||||
* @access private
|
* @access private
|
||||||
* @param array $x
|
* @param array $x
|
||||||
* @return int
|
* @return int
|
||||||
@ -2650,7 +2639,7 @@ class BigInteger
|
|||||||
* @param \phpseclib\Math\BigInteger $y
|
* @param \phpseclib\Math\BigInteger $y
|
||||||
* @return int < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
* @return int < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
||||||
* @access public
|
* @access public
|
||||||
* @see equals()
|
* @see self::equals()
|
||||||
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
||||||
*/
|
*/
|
||||||
function compare($y)
|
function compare($y)
|
||||||
@ -2673,7 +2662,7 @@ class BigInteger
|
|||||||
* @param array $y_value
|
* @param array $y_value
|
||||||
* @param bool $y_negative
|
* @param bool $y_negative
|
||||||
* @return int
|
* @return int
|
||||||
* @see compare()
|
* @see self::compare()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _compare($x_value, $x_negative, $y_value, $y_negative)
|
function _compare($x_value, $x_negative, $y_value, $y_negative)
|
||||||
@ -2709,7 +2698,7 @@ class BigInteger
|
|||||||
* @param \phpseclib\Math\BigInteger $x
|
* @param \phpseclib\Math\BigInteger $x
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access public
|
* @access public
|
||||||
* @see compare()
|
* @see self::compare()
|
||||||
*/
|
*/
|
||||||
function equals($x)
|
function equals($x)
|
||||||
{
|
{
|
||||||
@ -3259,7 +3248,7 @@ class BigInteger
|
|||||||
*
|
*
|
||||||
* If the current number is odd it'll be unchanged. If it's even, one will be added to it.
|
* If the current number is odd it'll be unchanged. If it's even, one will be added to it.
|
||||||
*
|
*
|
||||||
* @see randomPrime()
|
* @see self::randomPrime()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _make_odd()
|
function _make_odd()
|
||||||
@ -3509,7 +3498,7 @@ class BigInteger
|
|||||||
*
|
*
|
||||||
* @param \phpseclib\Math\BigInteger
|
* @param \phpseclib\Math\BigInteger
|
||||||
* @return \phpseclib\Math\BigInteger
|
* @return \phpseclib\Math\BigInteger
|
||||||
* @see _trim()
|
* @see self::_trim()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _normalize($result)
|
function _normalize($result)
|
||||||
@ -3689,7 +3678,7 @@ class BigInteger
|
|||||||
*
|
*
|
||||||
* The ability to DER-encode integers is needed to create RSA public keys for use with OpenSSL
|
* The ability to DER-encode integers is needed to create RSA public keys for use with OpenSSL
|
||||||
*
|
*
|
||||||
* @see modPow()
|
* @see self::modPow()
|
||||||
* @access private
|
* @access private
|
||||||
* @param int $length
|
* @param int $length
|
||||||
* @return string
|
* @return string
|
||||||
|
@ -91,7 +91,7 @@ class SFTP extends SSH2
|
|||||||
/**
|
/**
|
||||||
* Packet Types
|
* Packet Types
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::__construct()
|
* @see self::__construct()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -100,7 +100,7 @@ class SFTP extends SSH2
|
|||||||
/**
|
/**
|
||||||
* Status Codes
|
* Status Codes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::__construct()
|
* @see self::__construct()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -113,7 +113,7 @@ class SFTP extends SSH2
|
|||||||
* concurrent actions, so it's somewhat academic, here.
|
* concurrent actions, so it's somewhat academic, here.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @see \phpseclib\Net\SFTP::_send_sftp_packet()
|
* @see self::_send_sftp_packet()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $request_id = false;
|
var $request_id = false;
|
||||||
@ -125,7 +125,7 @@ class SFTP extends SSH2
|
|||||||
* concurrent actions, so it's somewhat academic, here.
|
* concurrent actions, so it's somewhat academic, here.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @see \phpseclib\Net\SFTP::_get_sftp_packet()
|
* @see self::_get_sftp_packet()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $packet_type = -1;
|
var $packet_type = -1;
|
||||||
@ -134,7 +134,7 @@ class SFTP extends SSH2
|
|||||||
* Packet Buffer
|
* Packet Buffer
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @see \phpseclib\Net\SFTP::_get_sftp_packet()
|
* @see self::_get_sftp_packet()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $packet_buffer = '';
|
var $packet_buffer = '';
|
||||||
@ -143,7 +143,7 @@ class SFTP extends SSH2
|
|||||||
* Extensions supported by the server
|
* Extensions supported by the server
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @see \phpseclib\Net\SFTP::_initChannel()
|
* @see self::_initChannel()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $extensions = array();
|
var $extensions = array();
|
||||||
@ -152,7 +152,7 @@ class SFTP extends SSH2
|
|||||||
* Server SFTP version
|
* Server SFTP version
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @see \phpseclib\Net\SFTP::_initChannel()
|
* @see self::_initChannel()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $version;
|
var $version;
|
||||||
@ -161,8 +161,8 @@ class SFTP extends SSH2
|
|||||||
* Current working directory
|
* Current working directory
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @see \phpseclib\Net\SFTP::_realpath()
|
* @see self::_realpath()
|
||||||
* @see \phpseclib\Net\SFTP::chdir()
|
* @see self::chdir()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $pwd = false;
|
var $pwd = false;
|
||||||
@ -170,7 +170,7 @@ class SFTP extends SSH2
|
|||||||
/**
|
/**
|
||||||
* Packet Type Log
|
* Packet Type Log
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::getLog()
|
* @see self::getLog()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -179,7 +179,7 @@ class SFTP extends SSH2
|
|||||||
/**
|
/**
|
||||||
* Packet Log
|
* Packet Log
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::getLog()
|
* @see self::getLog()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -188,8 +188,8 @@ class SFTP extends SSH2
|
|||||||
/**
|
/**
|
||||||
* Error information
|
* Error information
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::getSFTPErrors()
|
* @see self::getSFTPErrors()
|
||||||
* @see \phpseclib\Net\SFTP::getLastSFTPError()
|
* @see self::getLastSFTPError()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -201,9 +201,9 @@ class SFTP extends SSH2
|
|||||||
* Rather than always having to open a directory and close it immediately there after to see if a file is a directory
|
* Rather than always having to open a directory and close it immediately there after to see if a file is a directory
|
||||||
* we'll cache the results.
|
* we'll cache the results.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::_update_stat_cache()
|
* @see self::_update_stat_cache()
|
||||||
* @see \phpseclib\Net\SFTP::_remove_from_stat_cache()
|
* @see self::_remove_from_stat_cache()
|
||||||
* @see \phpseclib\Net\SFTP::_query_stat_cache()
|
* @see self::_query_stat_cache()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -212,8 +212,8 @@ class SFTP extends SSH2
|
|||||||
/**
|
/**
|
||||||
* Max SFTP Packet Size
|
* Max SFTP Packet Size
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SFTP::get()
|
* @see self::get()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -222,8 +222,8 @@ class SFTP extends SSH2
|
|||||||
/**
|
/**
|
||||||
* Stat Cache Flag
|
* Stat Cache Flag
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::disableStatCache()
|
* @see self::disableStatCache()
|
||||||
* @see \phpseclib\Net\SFTP::enableStatCache()
|
* @see self::enableStatCache()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -232,8 +232,8 @@ class SFTP extends SSH2
|
|||||||
/**
|
/**
|
||||||
* Sort Options
|
* Sort Options
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::_comparator()
|
* @see self::_comparator()
|
||||||
* @see \phpseclib\Net\SFTP::setListOrder()
|
* @see self::setListOrder()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -609,7 +609,7 @@ class SFTP extends SSH2
|
|||||||
* SFTP doesn't provide a mechanism by which the current working directory can be changed, so we'll emulate it. Returns
|
* SFTP doesn't provide a mechanism by which the current working directory can be changed, so we'll emulate it. Returns
|
||||||
* the absolute (canonicalized) path.
|
* the absolute (canonicalized) path.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::chdir()
|
* @see self::chdir()
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @throws \UnexpectedValueException on receipt of unexpected packets
|
* @throws \UnexpectedValueException on receipt of unexpected packets
|
||||||
* @return mixed
|
* @return mixed
|
||||||
@ -2658,8 +2658,8 @@ class SFTP extends SSH2
|
|||||||
*
|
*
|
||||||
* @param int $type
|
* @param int $type
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @see \phpseclib\Net\SFTP::_get_sftp_packet()
|
* @see self::_get_sftp_packet()
|
||||||
* @see \phpseclib\Net\SSH2::_send_channel_packet()
|
* @see self::_send_channel_packet()
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -2700,7 +2700,7 @@ class SFTP extends SSH2
|
|||||||
* There can be one SSH_MSG_CHANNEL_DATA messages containing two SFTP packets or there can be two SSH_MSG_CHANNEL_DATA
|
* There can be one SSH_MSG_CHANNEL_DATA messages containing two SFTP packets or there can be two SSH_MSG_CHANNEL_DATA
|
||||||
* messages containing one SFTP packet.
|
* messages containing one SFTP packet.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SFTP::_send_sftp_packet()
|
* @see self::_send_sftp_packet()
|
||||||
* @return string
|
* @return string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
|
@ -261,7 +261,7 @@ class SSH1
|
|||||||
*
|
*
|
||||||
* Logged for debug purposes
|
* Logged for debug purposes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getServerKeyPublicExponent()
|
* @see self::getServerKeyPublicExponent()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -272,7 +272,7 @@ class SSH1
|
|||||||
*
|
*
|
||||||
* Logged for debug purposes
|
* Logged for debug purposes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getServerKeyPublicModulus()
|
* @see self::getServerKeyPublicModulus()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -283,7 +283,7 @@ class SSH1
|
|||||||
*
|
*
|
||||||
* Logged for debug purposes
|
* Logged for debug purposes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getHostKeyPublicExponent()
|
* @see self::getHostKeyPublicExponent()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -294,7 +294,7 @@ class SSH1
|
|||||||
*
|
*
|
||||||
* Logged for debug purposes
|
* Logged for debug purposes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getHostKeyPublicModulus()
|
* @see self::getHostKeyPublicModulus()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -305,7 +305,7 @@ class SSH1
|
|||||||
*
|
*
|
||||||
* Logged for debug purposes
|
* Logged for debug purposes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getSupportedCiphers()
|
* @see self::getSupportedCiphers()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -324,7 +324,7 @@ class SSH1
|
|||||||
*
|
*
|
||||||
* Logged for debug purposes
|
* Logged for debug purposes
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getSupportedAuthentications()
|
* @see self::getSupportedAuthentications()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -338,7 +338,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Server Identification
|
* Server Identification
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getServerIdentification()
|
* @see self::getServerIdentification()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -347,7 +347,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Protocol Flags
|
* Protocol Flags
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::__construct()
|
* @see self::__construct()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -356,7 +356,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Protocol Flag Log
|
* Protocol Flag Log
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getLog()
|
* @see self::getLog()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -365,7 +365,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Message Log
|
* Message Log
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::getLog()
|
* @see self::getLog()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -374,7 +374,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Real-time log file pointer
|
* Real-time log file pointer
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_append_log()
|
* @see self::_append_log()
|
||||||
* @var resource
|
* @var resource
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -383,7 +383,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Real-time log file size
|
* Real-time log file size
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_append_log()
|
* @see self::_append_log()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -392,7 +392,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Real-time log file wrap boolean
|
* Real-time log file wrap boolean
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_append_log()
|
* @see self::_append_log()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -401,7 +401,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Interactive Buffer
|
* Interactive Buffer
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::read()
|
* @see self::read()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -410,7 +410,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Timeout
|
* Timeout
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::setTimeout()
|
* @see self::setTimeout()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $timeout;
|
var $timeout;
|
||||||
@ -418,7 +418,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Current Timeout
|
* Current Timeout
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_get_channel_packet()
|
* @see self::_get_channel_packet()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $curTimeout;
|
var $curTimeout;
|
||||||
@ -426,7 +426,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Log Boundary
|
* Log Boundary
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_format_log
|
* @see self::_format_log()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $log_boundary = ':';
|
var $log_boundary = ':';
|
||||||
@ -434,7 +434,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Log Long Width
|
* Log Long Width
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_format_log
|
* @see self::_format_log()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $log_long_width = 65;
|
var $log_long_width = 65;
|
||||||
@ -442,7 +442,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Log Short Width
|
* Log Short Width
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_format_log
|
* @see self::_format_log()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $log_short_width = 16;
|
var $log_short_width = 16;
|
||||||
@ -450,8 +450,8 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Hostname
|
* Hostname
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SSH1::_connect()
|
* @see self::_connect()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -460,8 +460,8 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Port Number
|
* Port Number
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SSH1::_connect()
|
* @see self::_connect()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -475,8 +475,8 @@ class SSH1
|
|||||||
* however, is non-optional. There will be a timeout, whether or not you set it. If you don't it'll be
|
* however, is non-optional. There will be a timeout, whether or not you set it. If you don't it'll be
|
||||||
* 10 seconds. It is used by fsockopen() in that function.
|
* 10 seconds. It is used by fsockopen() in that function.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SSH1::_connect()
|
* @see self::_connect()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -485,8 +485,8 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Default cipher
|
* Default cipher
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SSH1::_connect()
|
* @see self::_connect()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -782,8 +782,8 @@ class SSH1
|
|||||||
*
|
*
|
||||||
* Returns false on failure and the output, otherwise.
|
* Returns false on failure and the output, otherwise.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::interactiveRead()
|
* @see self::interactiveRead()
|
||||||
* @see \phpseclib\Net\SSH1::interactiveWrite()
|
* @see self::interactiveWrite()
|
||||||
* @param string $cmd
|
* @param string $cmd
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws \RuntimeException on error sending command
|
* @throws \RuntimeException on error sending command
|
||||||
@ -831,8 +831,8 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Creates an interactive shell
|
* Creates an interactive shell
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::interactiveRead()
|
* @see self::interactiveRead()
|
||||||
* @see \phpseclib\Net\SSH1::interactiveWrite()
|
* @see self::interactiveWrite()
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \UnexpectedValueException on receipt of unexpected packets
|
* @throws \UnexpectedValueException on receipt of unexpected packets
|
||||||
* @throws \RuntimeException on other errors
|
* @throws \RuntimeException on other errors
|
||||||
@ -874,7 +874,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Inputs a command into an interactive shell.
|
* Inputs a command into an interactive shell.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::interactiveWrite()
|
* @see self::interactiveWrite()
|
||||||
* @param string $cmd
|
* @param string $cmd
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access public
|
* @access public
|
||||||
@ -890,7 +890,7 @@ class SSH1
|
|||||||
* $expect can take the form of a string literal or, if $mode == self::READ__REGEX,
|
* $expect can take the form of a string literal or, if $mode == self::READ__REGEX,
|
||||||
* a regular expression.
|
* a regular expression.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::write()
|
* @see self::write()
|
||||||
* @param string $expect
|
* @param string $expect
|
||||||
* @param int $mode
|
* @param int $mode
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -929,7 +929,7 @@ class SSH1
|
|||||||
/**
|
/**
|
||||||
* Inputs a command into an interactive shell.
|
* Inputs a command into an interactive shell.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::interactiveRead()
|
* @see self::interactiveRead()
|
||||||
* @param string $cmd
|
* @param string $cmd
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \RuntimeException on connection error
|
* @throws \RuntimeException on connection error
|
||||||
@ -963,7 +963,7 @@ class SSH1
|
|||||||
* does not support ANSI escape sequences in Win32 Console applications", so if you're a Windows user,
|
* does not support ANSI escape sequences in Win32 Console applications", so if you're a Windows user,
|
||||||
* there's not going to be much recourse.
|
* there's not going to be much recourse.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::interactiveRead()
|
* @see self::interactiveRead()
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \RuntimeException on connection error
|
* @throws \RuntimeException on connection error
|
||||||
* @access public
|
* @access public
|
||||||
@ -1051,7 +1051,7 @@ class SSH1
|
|||||||
* Also, this function could be improved upon by adding detection for the following exploit:
|
* Also, this function could be improved upon by adding detection for the following exploit:
|
||||||
* http://www.securiteam.com/securitynews/5LP042K3FY.html
|
* http://www.securiteam.com/securitynews/5LP042K3FY.html
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @return array
|
* @return array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -1127,7 +1127,7 @@ class SSH1
|
|||||||
*
|
*
|
||||||
* Returns true on success, false on failure.
|
* Returns true on success, false on failure.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access private
|
* @access private
|
||||||
@ -1174,8 +1174,8 @@ class SSH1
|
|||||||
* we've reimplemented it. A more detailed discussion of the differences can be found after
|
* we've reimplemented it. A more detailed discussion of the differences can be found after
|
||||||
* $crc_lookup_table's initialization.
|
* $crc_lookup_table's initialization.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @see \phpseclib\Net\SSH1::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @return int
|
* @return int
|
||||||
* @access private
|
* @access private
|
||||||
@ -1291,7 +1291,7 @@ class SSH1
|
|||||||
* should be a number with the property that gcd($e, ($p - 1) * ($q - 1)) == 1. Could just make anything that
|
* should be a number with the property that gcd($e, ($p - 1) * ($q - 1)) == 1. Could just make anything that
|
||||||
* calls this call modexp, instead, but I think this makes things clearer, maybe...
|
* calls this call modexp, instead, but I think this makes things clearer, maybe...
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH1::__construct()
|
* @see self::__construct()
|
||||||
* @param BigInteger $m
|
* @param BigInteger $m
|
||||||
* @param array $key
|
* @param array $key
|
||||||
* @return BigInteger
|
* @return BigInteger
|
||||||
|
@ -177,8 +177,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Error information
|
* Error information
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getErrors()
|
* @see self::getErrors()
|
||||||
* @see \phpseclib\Net\SSH2::getLastError()
|
* @see self::getLastError()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -187,7 +187,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Server Identifier
|
* Server Identifier
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getServerIdentification()
|
* @see self::getServerIdentification()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -196,7 +196,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Key Exchange Algorithms
|
* Key Exchange Algorithms
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getKexAlgorithims()
|
* @see self::getKexAlgorithims()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -205,7 +205,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Minimum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
|
* Minimum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
|
||||||
*
|
*
|
||||||
* @see Net_SSH2::_key_exchange()
|
* @see self::_key_exchange()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -214,7 +214,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Preferred Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
|
* Preferred Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
|
||||||
*
|
*
|
||||||
* @see Net_SSH2::_key_exchange()
|
* @see self::_key_exchange()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -223,7 +223,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Maximum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
|
* Maximum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods
|
||||||
*
|
*
|
||||||
* @see Net_SSH2::_key_exchange()
|
* @see self::_key_exchange()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -232,7 +232,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Server Host Key Algorithms
|
* Server Host Key Algorithms
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getServerHostKeyAlgorithms()
|
* @see self::getServerHostKeyAlgorithms()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -241,7 +241,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Encryption Algorithms: Client to Server
|
* Encryption Algorithms: Client to Server
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getEncryptionAlgorithmsClient2Server()
|
* @see self::getEncryptionAlgorithmsClient2Server()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -250,7 +250,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Encryption Algorithms: Server to Client
|
* Encryption Algorithms: Server to Client
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getEncryptionAlgorithmsServer2Client()
|
* @see self::getEncryptionAlgorithmsServer2Client()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -259,7 +259,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* MAC Algorithms: Client to Server
|
* MAC Algorithms: Client to Server
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getMACAlgorithmsClient2Server()
|
* @see self::getMACAlgorithmsClient2Server()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -268,7 +268,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* MAC Algorithms: Server to Client
|
* MAC Algorithms: Server to Client
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getMACAlgorithmsServer2Client()
|
* @see self::getMACAlgorithmsServer2Client()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -277,7 +277,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Compression Algorithms: Client to Server
|
* Compression Algorithms: Client to Server
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getCompressionAlgorithmsClient2Server()
|
* @see self::getCompressionAlgorithmsClient2Server()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -286,7 +286,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Compression Algorithms: Server to Client
|
* Compression Algorithms: Server to Client
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getCompressionAlgorithmsServer2Client()
|
* @see self::getCompressionAlgorithmsServer2Client()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -295,7 +295,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Languages: Server to Client
|
* Languages: Server to Client
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getLanguagesServer2Client()
|
* @see self::getLanguagesServer2Client()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -304,7 +304,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Languages: Client to Server
|
* Languages: Client to Server
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getLanguagesClient2Server()
|
* @see self::getLanguagesClient2Server()
|
||||||
* @var array|false
|
* @var array|false
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -320,8 +320,8 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* -- http://tools.ietf.org/html/rfc4253#section-6
|
* -- http://tools.ietf.org/html/rfc4253#section-6
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SSH2::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -330,8 +330,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Block Size for Client to Server Encryption
|
* Block Size for Client to Server Encryption
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SSH2::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -340,7 +340,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Server to Client Encryption Object
|
* Server to Client Encryption Object
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @var object
|
* @var object
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -349,7 +349,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Client to Server Encryption Object
|
* Client to Server Encryption Object
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @var object
|
* @var object
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -358,7 +358,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Client to Server HMAC Object
|
* Client to Server HMAC Object
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @var object
|
* @var object
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -367,7 +367,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Server to Client HMAC Object
|
* Server to Client HMAC Object
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @var object
|
* @var object
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -380,7 +380,7 @@ class SSH2
|
|||||||
* For the client to server side, the HMAC object will make the HMAC as long as it needs to be. All we need to do is
|
* For the client to server side, the HMAC object will make the HMAC as long as it needs to be. All we need to do is
|
||||||
* append it.
|
* append it.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -389,7 +389,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Server Public Host Key
|
* Server Public Host Key
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getServerPublicHostKey()
|
* @see self::getServerPublicHostKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -404,7 +404,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* -- http://tools.ietf.org/html/rfc4253#section-7.2
|
* -- http://tools.ietf.org/html/rfc4253#section-7.2
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_key_exchange()
|
* @see self::_key_exchange()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -415,7 +415,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* The current exchange hash
|
* The current exchange hash
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_key_exchange()
|
* @see self::_key_exchange()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -424,7 +424,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Message Numbers
|
* Message Numbers
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -433,7 +433,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Disconnection Message 'reason codes' defined in RFC4253
|
* Disconnection Message 'reason codes' defined in RFC4253
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -442,7 +442,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* SSH_MSG_CHANNEL_OPEN_FAILURE 'reason codes', defined in RFC4254
|
* SSH_MSG_CHANNEL_OPEN_FAILURE 'reason codes', defined in RFC4254
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -452,7 +452,7 @@ class SSH2
|
|||||||
* Terminal Modes
|
* Terminal Modes
|
||||||
*
|
*
|
||||||
* @link http://tools.ietf.org/html/rfc4254#section-8
|
* @link http://tools.ietf.org/html/rfc4254#section-8
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -462,7 +462,7 @@ class SSH2
|
|||||||
* SSH_MSG_CHANNEL_EXTENDED_DATA's data_type_codes
|
* SSH_MSG_CHANNEL_EXTENDED_DATA's data_type_codes
|
||||||
*
|
*
|
||||||
* @link http://tools.ietf.org/html/rfc4254#section-5.2
|
* @link http://tools.ietf.org/html/rfc4254#section-5.2
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -473,7 +473,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* See 'Section 6.4. Data Integrity' of rfc4253 for more info.
|
* See 'Section 6.4. Data Integrity' of rfc4253 for more info.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -484,7 +484,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* See 'Section 6.4. Data Integrity' of rfc4253 for more info.
|
* See 'Section 6.4. Data Integrity' of rfc4253 for more info.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -495,8 +495,8 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* Maps client channels to server channels
|
* Maps client channels to server channels
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_channel_packet()
|
* @see self::_get_channel_packet()
|
||||||
* @see \phpseclib\Net\SSH2::exec()
|
* @see self::exec()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -508,8 +508,8 @@ class SSH2
|
|||||||
* If a client requests a packet from one channel but receives two packets from another those packets should
|
* If a client requests a packet from one channel but receives two packets from another those packets should
|
||||||
* be placed in a buffer
|
* be placed in a buffer
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_channel_packet()
|
* @see self::_get_channel_packet()
|
||||||
* @see \phpseclib\Net\SSH2::exec()
|
* @see self::exec()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -520,7 +520,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* Contains the type of the last sent message
|
* Contains the type of the last sent message
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_channel_packet()
|
* @see self::_get_channel_packet()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -531,7 +531,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* Maximum packet size indexed by channel
|
* Maximum packet size indexed by channel
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_send_channel_packet()
|
* @see self::_send_channel_packet()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -540,7 +540,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Message Number Log
|
* Message Number Log
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getLog()
|
* @see self::getLog()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -549,7 +549,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Message Log
|
* Message Log
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getLog()
|
* @see self::getLog()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -561,8 +561,8 @@ class SSH2
|
|||||||
* Bytes the other party can send before it must wait for the window to be adjusted (0x7FFFFFFF = 2GB)
|
* Bytes the other party can send before it must wait for the window to be adjusted (0x7FFFFFFF = 2GB)
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @see \phpseclib\Net\SSH2::_send_channel_packet()
|
* @see self::_send_channel_packet()
|
||||||
* @see \phpseclib\Net\SSH2::exec()
|
* @see self::exec()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $window_size = 0x7FFFFFFF;
|
var $window_size = 0x7FFFFFFF;
|
||||||
@ -572,7 +572,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* Window size indexed by channel
|
* Window size indexed by channel
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_send_channel_packet()
|
* @see self::_send_channel_packet()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -583,7 +583,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* Window size indexed by channel
|
* Window size indexed by channel
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_channel_packet()
|
* @see self::_get_channel_packet()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -594,7 +594,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* Verified against $this->session_id
|
* Verified against $this->session_id
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getServerPublicHostKey()
|
* @see self::getServerPublicHostKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -605,7 +605,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* ssh-rsa or ssh-dss.
|
* ssh-rsa or ssh-dss.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getServerPublicHostKey()
|
* @see self::getServerPublicHostKey()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -614,7 +614,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Interactive Buffer
|
* Interactive Buffer
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::read()
|
* @see self::read()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -625,8 +625,8 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* Should never exceed self::LOG_MAX_SIZE
|
* Should never exceed self::LOG_MAX_SIZE
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @see \phpseclib\Net\SSH2::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -635,7 +635,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Timeout
|
* Timeout
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::setTimeout()
|
* @see self::setTimeout()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $timeout;
|
var $timeout;
|
||||||
@ -643,7 +643,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Current Timeout
|
* Current Timeout
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_channel_packet()
|
* @see self::_get_channel_packet()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $curTimeout;
|
var $curTimeout;
|
||||||
@ -651,7 +651,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Real-time log file pointer
|
* Real-time log file pointer
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_append_log()
|
* @see self::_append_log()
|
||||||
* @var resource
|
* @var resource
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -660,7 +660,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Real-time log file size
|
* Real-time log file size
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_append_log()
|
* @see self::_append_log()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -669,7 +669,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Has the signature been validated?
|
* Has the signature been validated?
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getServerPublicHostKey()
|
* @see self::getServerPublicHostKey()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -678,7 +678,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Real-time log file wrap boolean
|
* Real-time log file wrap boolean
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_append_log()
|
* @see self::_append_log()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $realtime_log_wrap;
|
var $realtime_log_wrap;
|
||||||
@ -686,7 +686,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Flag to suppress stderr from output
|
* Flag to suppress stderr from output
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::enableQuietMode()
|
* @see self::enableQuietMode()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $quiet_mode = false;
|
var $quiet_mode = false;
|
||||||
@ -711,7 +711,7 @@ class SSH2
|
|||||||
* Flag to request a PTY when using exec()
|
* Flag to request a PTY when using exec()
|
||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
* @see \phpseclib\Net\SSH2::enablePTY()
|
* @see self::enablePTY()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
var $request_pty = false;
|
var $request_pty = false;
|
||||||
@ -743,7 +743,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* The Last Interactive Response
|
* The Last Interactive Response
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_keyboard_interactive_process()
|
* @see self::_keyboard_interactive_process()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -752,7 +752,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Keyboard Interactive Request / Responses
|
* Keyboard Interactive Request / Responses
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_keyboard_interactive_process()
|
* @see self::_keyboard_interactive_process()
|
||||||
* @var array
|
* @var array
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -764,8 +764,8 @@ class SSH2
|
|||||||
* Quoting from the RFC, "in some jurisdictions, sending a warning message before
|
* Quoting from the RFC, "in some jurisdictions, sending a warning message before
|
||||||
* authentication may be relevant for getting legal protection."
|
* authentication may be relevant for getting legal protection."
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_filter()
|
* @see self::_filter()
|
||||||
* @see \phpseclib\Net\SSH2::getBannerMessage()
|
* @see self::getBannerMessage()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -774,7 +774,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Did read() timeout or return normally?
|
* Did read() timeout or return normally?
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::isTimeout()
|
* @see self::isTimeout()
|
||||||
* @var bool
|
* @var bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -783,7 +783,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Log Boundary
|
* Log Boundary
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_format_log()
|
* @see self::_format_log()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -792,7 +792,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Log Long Width
|
* Log Long Width
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_format_log()
|
* @see self::_format_log()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -801,7 +801,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Log Short Width
|
* Log Short Width
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_format_log()
|
* @see self::_format_log()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -810,8 +810,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Hostname
|
* Hostname
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SSH2::_connect()
|
* @see self::_connect()
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -820,8 +820,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Port Number
|
* Port Number
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::__construct()
|
* @see self::__construct()
|
||||||
* @see \phpseclib\Net\SSH2::_connect()
|
* @see self::_connect()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -830,9 +830,9 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Number of columns for terminal window size
|
* Number of columns for terminal window size
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getWindowColumns()
|
* @see self::getWindowColumns()
|
||||||
* @see \phpseclib\Net\SSH2::setWindowColumns()
|
* @see self::setWindowColumns()
|
||||||
* @see \phpseclib\Net\SSH2::setWindowSize()
|
* @see self::setWindowSize()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -841,9 +841,9 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Number of columns for terminal window size
|
* Number of columns for terminal window size
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::getWindowRows()
|
* @see self::getWindowRows()
|
||||||
* @see \phpseclib\Net\SSH2::setWindowRows()
|
* @see self::setWindowRows()
|
||||||
* @see \phpseclib\Net\SSH2::setWindowSize()
|
* @see self::setWindowSize()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -852,8 +852,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Crypto Engine
|
* Crypto Engine
|
||||||
*
|
*
|
||||||
* @see Net_SSH2::setCryptoEngine()
|
* @see self::setCryptoEngine()
|
||||||
* @see Net_SSH2::_key_exchange()
|
* @see self::_key_exchange()
|
||||||
* @var int
|
* @var int
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -883,7 +883,7 @@ class SSH2
|
|||||||
* @param mixed $host
|
* @param mixed $host
|
||||||
* @param int $port
|
* @param int $port
|
||||||
* @param int $timeout
|
* @param int $timeout
|
||||||
* @see \phpseclib\Net\SSH2::login()
|
* @see self::login()
|
||||||
* @return \phpseclib\Net\SSH2
|
* @return \phpseclib\Net\SSH2
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
@ -1852,7 +1852,7 @@ class SSH2
|
|||||||
* @param mixed $password
|
* @param mixed $password
|
||||||
* @param mixed $...
|
* @param mixed $...
|
||||||
* @return bool
|
* @return bool
|
||||||
* @see _login
|
* @see self::_login()
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function login($username)
|
function login($username)
|
||||||
@ -1868,7 +1868,7 @@ class SSH2
|
|||||||
* @param mixed $password
|
* @param mixed $password
|
||||||
* @param mixed $...
|
* @param mixed $...
|
||||||
* @return bool
|
* @return bool
|
||||||
* @see _login_helper
|
* @see self::_login_helper()
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _login($username)
|
function _login($username)
|
||||||
@ -2511,8 +2511,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Creates an interactive shell
|
* Creates an interactive shell
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::read()
|
* @see self::read()
|
||||||
* @see \phpseclib\Net\SSH2::write()
|
* @see self::write()
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \UnexpectedValueException on receipt of unexpected packets
|
* @throws \UnexpectedValueException on receipt of unexpected packets
|
||||||
* @throws \RuntimeException on other errors
|
* @throws \RuntimeException on other errors
|
||||||
@ -2616,8 +2616,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Return the channel to be used with read() / write()
|
* Return the channel to be used with read() / write()
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::read()
|
* @see self::read()
|
||||||
* @see \phpseclib\Net\SSH2::write()
|
* @see self::write()
|
||||||
* @return int
|
* @return int
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
@ -2657,7 +2657,7 @@ class SSH2
|
|||||||
* Returns when there's a match for $expect, which can take the form of a string literal or,
|
* Returns when there's a match for $expect, which can take the form of a string literal or,
|
||||||
* if $mode == self::READ_REGEX, a regular expression.
|
* if $mode == self::READ_REGEX, a regular expression.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::write()
|
* @see self::write()
|
||||||
* @param string $expect
|
* @param string $expect
|
||||||
* @param int $mode
|
* @param int $mode
|
||||||
* @return string
|
* @return string
|
||||||
@ -2702,7 +2702,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Inputs a command into an interactive shell.
|
* Inputs a command into an interactive shell.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::read()
|
* @see self::read()
|
||||||
* @param string $cmd
|
* @param string $cmd
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \RuntimeException on connection error
|
* @throws \RuntimeException on connection error
|
||||||
@ -2730,7 +2730,7 @@ class SSH2
|
|||||||
* returns that and then that that was passed into stopSubsystem() but that'll be saved for a future date and implemented
|
* returns that and then that that was passed into stopSubsystem() but that'll be saved for a future date and implemented
|
||||||
* if there's sufficient demand for such a feature.
|
* if there's sufficient demand for such a feature.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::stopSubsystem()
|
* @see self::stopSubsystem()
|
||||||
* @param string $subsystem
|
* @param string $subsystem
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access public
|
* @access public
|
||||||
@ -2793,7 +2793,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Stops a subsystem.
|
* Stops a subsystem.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::startSubsystem()
|
* @see self::startSubsystem()
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
@ -2871,7 +2871,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* See '6. Binary Packet Protocol' of rfc4253 for more info.
|
* See '6. Binary Packet Protocol' of rfc4253 for more info.
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \RuntimeException on connection errors
|
* @throws \RuntimeException on connection errors
|
||||||
* @access private
|
* @access private
|
||||||
@ -2959,7 +2959,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* Because some binary packets need to be ignored...
|
* Because some binary packets need to be ignored...
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @return string
|
* @return string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -3108,9 +3108,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Returns whether Quiet Mode is enabled or not
|
* Returns whether Quiet Mode is enabled or not
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::enableQuietMode()
|
* @see self::enableQuietMode()
|
||||||
* @see \phpseclib\Net\SSH2::disableQuietMode()
|
* @see self::disableQuietMode()
|
||||||
*
|
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@ -3142,9 +3141,8 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Returns whether request-pty is enabled or not
|
* Returns whether request-pty is enabled or not
|
||||||
*
|
*
|
||||||
* @see \phpseclib\Net\SSH2::enablePTY()
|
* @see self::enablePTY()
|
||||||
* @see \phpseclib\Net\SSH2::disablePTY()
|
* @see self::disablePTY()
|
||||||
*
|
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@ -3376,7 +3374,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $logged
|
* @param string $logged
|
||||||
* @see \phpseclib\Net\SSH2::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +38,7 @@ class Identity
|
|||||||
*
|
*
|
||||||
* @var \phpseclib\Crypt\RSA
|
* @var \phpseclib\Crypt\RSA
|
||||||
* @access private
|
* @access private
|
||||||
* @see \phpseclib\System\SSH\Agent\Identity::getPublicKey()
|
* @see self::getPublicKey()
|
||||||
*/
|
*/
|
||||||
var $key;
|
var $key;
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ class Identity
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @access private
|
* @access private
|
||||||
* @see \phpseclib\System\SSH\Agent\Identity::sign()
|
* @see self::sign()
|
||||||
*/
|
*/
|
||||||
var $key_blob;
|
var $key_blob;
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ class Identity
|
|||||||
*
|
*
|
||||||
* @var resource
|
* @var resource
|
||||||
* @access private
|
* @access private
|
||||||
* @see \phpseclib\System\SSH\Agent\Identity::sign()
|
* @see self::sign()
|
||||||
*/
|
*/
|
||||||
var $fsock;
|
var $fsock;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user