Merge pull request #802 from GrahamForks/2.0-phpdoc

[2.0] PHPDoc Fixes

* GrahamForks/2.0-phpdoc:
  Fixed lots of phpdoc typos
  Fixed invalid param phpdoc
This commit is contained in:
Andreas Fischer 2015-09-02 20:47:45 +02:00
commit 40927a4033
24 changed files with 1256 additions and 1256 deletions

View File

@ -67,7 +67,7 @@ class AES extends Rijndael
* *
* @see \phpseclib\Crypt\Rijndael::setBlockLength() * @see \phpseclib\Crypt\Rijndael::setBlockLength()
* @access public * @access public
* @param Integer $length * @param int $length
*/ */
function setBlockLength($length) function setBlockLength($length)
{ {
@ -82,7 +82,7 @@ class AES extends Rijndael
* *
* @see \phpseclib\Crypt\Rijndael:setKeyLength() * @see \phpseclib\Crypt\Rijndael:setKeyLength()
* @access public * @access public
* @param Integer $length * @param int $length
*/ */
function setKeyLength($length) function setKeyLength($length)
{ {
@ -104,7 +104,7 @@ class AES extends Rijndael
* @see \phpseclib\Crypt\Rijndael:setKey() * @see \phpseclib\Crypt\Rijndael:setKey()
* @see setKeyLength() * @see setKeyLength()
* @access public * @access public
* @param String $key * @param string $key
*/ */
function setKey($key) function setKey($key)
{ {

View File

@ -94,7 +94,7 @@ abstract class Base
* Whirlpool available flag * Whirlpool available flag
* *
* @see \phpseclib\Crypt\Base::_hashInlineCryptFunction() * @see \phpseclib\Crypt\Base::_hashInlineCryptFunction()
* @var Boolean * @var bool
* @access private * @access private
*/ */
static $WHIRLPOOL_AVAILABLE; static $WHIRLPOOL_AVAILABLE;
@ -121,7 +121,7 @@ abstract class Base
* The Encryption Mode * The Encryption Mode
* *
* @see \phpseclib\Crypt\Base::__construct() * @see \phpseclib\Crypt\Base::__construct()
* @var Integer * @var int
* @access private * @access private
*/ */
var $mode; var $mode;
@ -129,7 +129,7 @@ abstract class Base
/** /**
* The Block Length of the block cipher * The Block Length of the block cipher
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $block_size = 16; var $block_size = 16;
@ -138,7 +138,7 @@ abstract class Base
* The Key * The Key
* *
* @see \phpseclib\Crypt\Base::setKey() * @see \phpseclib\Crypt\Base::setKey()
* @var String * @var string
* @access private * @access private
*/ */
var $key = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; var $key = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
@ -147,7 +147,7 @@ abstract class Base
* The Initialization Vector * The Initialization Vector
* *
* @see \phpseclib\Crypt\Base::setIV() * @see \phpseclib\Crypt\Base::setIV()
* @var String * @var string
* @access private * @access private
*/ */
var $iv; var $iv;
@ -157,7 +157,7 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Base::enableContinuousBuffer() * @see \phpseclib\Crypt\Base::enableContinuousBuffer()
* @see \phpseclib\Crypt\Base::_clearBuffers() * @see \phpseclib\Crypt\Base::_clearBuffers()
* @var String * @var string
* @access private * @access private
*/ */
var $encryptIV; var $encryptIV;
@ -167,7 +167,7 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Base::enableContinuousBuffer() * @see \phpseclib\Crypt\Base::enableContinuousBuffer()
* @see \phpseclib\Crypt\Base::_clearBuffers() * @see \phpseclib\Crypt\Base::_clearBuffers()
* @var String * @var string
* @access private * @access private
*/ */
var $decryptIV; var $decryptIV;
@ -176,7 +176,7 @@ abstract class Base
* Continuous Buffer status * Continuous Buffer status
* *
* @see \phpseclib\Crypt\Base::enableContinuousBuffer() * @see \phpseclib\Crypt\Base::enableContinuousBuffer()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $continuousBuffer = false; var $continuousBuffer = false;
@ -186,7 +186,7 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @see \phpseclib\Crypt\Base::_clearBuffers() * @see \phpseclib\Crypt\Base::_clearBuffers()
* @var Array * @var array
* @access private * @access private
*/ */
var $enbuffer; var $enbuffer;
@ -196,7 +196,7 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @see \phpseclib\Crypt\Base::_clearBuffers() * @see \phpseclib\Crypt\Base::_clearBuffers()
* @var Array * @var array
* @access private * @access private
*/ */
var $debuffer; var $debuffer;
@ -208,7 +208,7 @@ abstract class Base
* 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 \phpseclib\Crypt\Base::encrypt()
* @var Resource * @var resource
* @access private * @access private
*/ */
var $enmcrypt; var $enmcrypt;
@ -220,7 +220,7 @@ abstract class Base
* 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 \phpseclib\Crypt\Base::decrypt()
* @var Resource * @var resource
* @access private * @access private
*/ */
var $demcrypt; var $demcrypt;
@ -230,7 +230,7 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Twofish::setKey() * @see \phpseclib\Crypt\Twofish::setKey()
* @see \phpseclib\Crypt\Twofish::setIV() * @see \phpseclib\Crypt\Twofish::setIV()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $enchanged = true; var $enchanged = true;
@ -240,7 +240,7 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Twofish::setKey() * @see \phpseclib\Crypt\Twofish::setKey()
* @see \phpseclib\Crypt\Twofish::setIV() * @see \phpseclib\Crypt\Twofish::setIV()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $dechanged = true; var $dechanged = true;
@ -259,7 +259,7 @@ abstract class Base
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @see \phpseclib\Crypt\Base::_setupMcrypt() * @see \phpseclib\Crypt\Base::_setupMcrypt()
* @var Resource * @var resource
* @access private * @access private
*/ */
var $ecb; var $ecb;
@ -281,7 +281,7 @@ abstract class Base
* on its internaly Key-expanding algorithm. * on its internaly Key-expanding algorithm.
* *
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @var Integer * @var int
* @access private * @access private
*/ */
var $cfb_init_len = 600; var $cfb_init_len = 600;
@ -292,7 +292,7 @@ abstract class Base
* @see setKey() * @see setKey()
* @see setIV() * @see setIV()
* @see disableContinuousBuffer() * @see disableContinuousBuffer()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $changed = true; var $changed = true;
@ -301,7 +301,7 @@ abstract class Base
* Padding status * Padding status
* *
* @see \phpseclib\Crypt\Base::enablePadding() * @see \phpseclib\Crypt\Base::enablePadding()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $padding = true; var $padding = true;
@ -310,7 +310,7 @@ abstract class Base
* Is the mode one that is paddable? * Is the mode one that is paddable?
* *
* @see \phpseclib\Crypt\Base::__construct() * @see \phpseclib\Crypt\Base::__construct()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $paddable = false; var $paddable = false;
@ -327,7 +327,7 @@ abstract class Base
* @see \phpseclib\Crypt\Base::_setEngine() * @see \phpseclib\Crypt\Base::_setEngine()
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @var Integer * @var int
* @access private * @access private
*/ */
var $engine; var $engine;
@ -337,7 +337,7 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Base::_setEngine() * @see \phpseclib\Crypt\Base::_setEngine()
* @see \phpseclib\Crypt\Base::setPreferredEngine() * @see \phpseclib\Crypt\Base::setPreferredEngine()
* @var Integer * @var int
* @access private * @access private
*/ */
var $preferredEngine; var $preferredEngine;
@ -350,7 +350,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 \phpseclib\Crypt\Base::_setupMcrypt()
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_mcrypt; var $cipher_name_mcrypt;
@ -361,7 +361,7 @@ abstract class Base
* Only used if $engine == CRYPT_ENGINE_OPENSSL * Only used if $engine == CRYPT_ENGINE_OPENSSL
* *
* @link http://www.php.net/openssl-get-cipher-methods * @link http://www.php.net/openssl-get-cipher-methods
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_openssl; var $cipher_name_openssl;
@ -373,7 +373,7 @@ abstract class Base
* it can still be emulated with ECB mode. * it can still be emulated with ECB mode.
* *
* @link http://www.php.net/openssl-get-cipher-methods * @link http://www.php.net/openssl-get-cipher-methods
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_openssl_ecb; var $cipher_name_openssl_ecb;
@ -382,7 +382,7 @@ abstract class Base
* The default password key_size used by setPassword() * The default password key_size used by setPassword()
* *
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var Integer * @var int
* @access private * @access private
*/ */
var $password_key_size = 32; var $password_key_size = 32;
@ -391,7 +391,7 @@ abstract class Base
* The default salt used by setPassword() * The default salt used by setPassword()
* *
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var String * @var string
* @access private * @access private
*/ */
var $password_default_salt = 'phpseclib/salt'; var $password_default_salt = 'phpseclib/salt';
@ -426,7 +426,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 \phpseclib\Crypt\Base::_openssl_ctr_process()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $openssl_emulate_ctr = false; var $openssl_emulate_ctr = false;
@ -461,7 +461,7 @@ abstract class Base
* *
* If not explicitly set, self::MODE_CBC will be used. * If not explicitly set, self::MODE_CBC will be used.
* *
* @param optional Integer $mode * @param int $mode
* @access public * @access public
*/ */
function __construct($mode = self::MODE_CBC) function __construct($mode = self::MODE_CBC)
@ -499,7 +499,7 @@ abstract class Base
* to be all zero's. * to be all zero's.
* *
* @access public * @access public
* @param String $iv * @param string $iv
* @internal Can be overwritten by a sub class, but does not have to be * @internal Can be overwritten by a sub class, but does not have to be
*/ */
function setIV($iv) function setIV($iv)
@ -523,7 +523,7 @@ abstract class Base
* If the key is not explicitly set, it'll be assumed to be all null bytes. * If the key is not explicitly set, it'll be assumed to be all null bytes.
* *
* @access public * @access public
* @param String $key * @param string $key
* @internal Could, but not must, extend by the child Crypt_* class * @internal Could, but not must, extend by the child Crypt_* class
*/ */
function setKey($key) function setKey($key)
@ -543,9 +543,9 @@ abstract class Base
* Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php * Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php
* *
* @see Crypt/Hash.php * @see Crypt/Hash.php
* @param String $password * @param string $password
* @param optional String $method * @param string $method
* @return Boolean * @return bool
* @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
*/ */
@ -636,8 +636,8 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @access public * @access public
* @param String $plaintext * @param string $plaintext
* @return String $ciphertext * @return string $ciphertext
* @internal Could, but not must, extend by the child Crypt_* class * @internal Could, but not must, extend by the child Crypt_* class
*/ */
function encrypt($plaintext) function encrypt($plaintext)
@ -934,8 +934,8 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @access public * @access public
* @param String $ciphertext * @param string $ciphertext
* @return String $plaintext * @return string $plaintext
* @internal Could, but not must, extend by the child Crypt_* class * @internal Could, but not must, extend by the child Crypt_* class
*/ */
function decrypt($ciphertext) function decrypt($ciphertext)
@ -1225,10 +1225,10 @@ abstract class Base
* *
* @see Crypt_Base::encrypt() * @see Crypt_Base::encrypt()
* @see Crypt_Base::decrypt() * @see Crypt_Base::decrypt()
* @param String $plaintext * @param string $plaintext
* @param String $encryptIV * @param string $encryptIV
* @param Array $buffer * @param array $buffer
* @return String * @return string
* @access private * @access private
*/ */
function _openssl_ctr_process($plaintext, &$encryptIV, &$buffer) function _openssl_ctr_process($plaintext, &$encryptIV, &$buffer)
@ -1319,10 +1319,10 @@ abstract class Base
* *
* @see Crypt_Base::encrypt() * @see Crypt_Base::encrypt()
* @see Crypt_Base::decrypt() * @see Crypt_Base::decrypt()
* @param String $plaintext * @param string $plaintext
* @param String $encryptIV * @param string $encryptIV
* @param Array $buffer * @param array $buffer
* @return String * @return string
* @access private * @access private
*/ */
function _openssl_ofb_process($plaintext, &$encryptIV, &$buffer) function _openssl_ofb_process($plaintext, &$encryptIV, &$buffer)
@ -1368,7 +1368,7 @@ abstract class Base
* *
* May need to be overwritten by classes extending this one in some cases * May need to be overwritten by classes extending this one in some cases
* *
* @return Integer * @return int
* @access private * @access private
*/ */
function _openssl_translate_mode() function _openssl_translate_mode()
@ -1495,9 +1495,9 @@ abstract class Base
* Test for engine validity * Test for engine validity
* *
* @see \phpseclib\Crypt\Base::Crypt_Base() * @see \phpseclib\Crypt\Base::Crypt_Base()
* @param Integer $engine * @param int $engine
* @access public * @access public
* @return Boolean * @return bool
*/ */
function isValidEngine($engine) function isValidEngine($engine)
{ {
@ -1562,7 +1562,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 \phpseclib\Crypt\Base::Crypt_Base()
* @param Integer $engine * @param int $engine
* @access public * @access public
*/ */
function setPreferredEngine($engine) function setPreferredEngine($engine)
@ -1639,8 +1639,8 @@ abstract class Base
* Note: Must be extended by the child \phpseclib\Crypt\* class * Note: Must be extended by the child \phpseclib\Crypt\* class
* *
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
abstract function _encryptBlock($in); abstract function _encryptBlock($in);
@ -1650,8 +1650,8 @@ abstract class Base
* Note: Must be extended by the child \phpseclib\Crypt\* class * Note: Must be extended by the child \phpseclib\Crypt\* class
* *
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
abstract function _decryptBlock($in); abstract function _decryptBlock($in);
@ -1767,9 +1767,9 @@ abstract class Base
* and padding will, hence forth, be enabled. * and padding will, hence forth, be enabled.
* *
* @see \phpseclib\Crypt\Base::_unpad() * @see \phpseclib\Crypt\Base::_unpad()
* @param String $text * @param string $text
* @access private * @access private
* @return String * @return string
*/ */
function _pad($text) function _pad($text)
{ {
@ -1796,9 +1796,9 @@ abstract class Base
* and false will be returned. * and false will be returned.
* *
* @see \phpseclib\Crypt\Base::_pad() * @see \phpseclib\Crypt\Base::_pad()
* @param String $text * @param string $text
* @access private * @access private
* @return String * @return string
*/ */
function _unpad($text) function _unpad($text)
{ {
@ -1839,10 +1839,10 @@ abstract class Base
* *
* Inspired by array_shift * Inspired by array_shift
* *
* @param String $string * @param string $string
* @param optional Integer $index * @param int $index
* @access private * @access private
* @return String * @return string
*/ */
function _string_shift(&$string, $index = 1) function _string_shift(&$string, $index = 1)
{ {
@ -1856,10 +1856,10 @@ abstract class Base
* *
* Inspired by array_pop * Inspired by array_pop
* *
* @param String $string * @param string $string
* @param optional Integer $index * @param int $index
* @access private * @access private
* @return String * @return string
*/ */
function _string_pop(&$string, $index = 1) function _string_pop(&$string, $index = 1)
{ {
@ -1873,7 +1873,7 @@ abstract class Base
* *
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @param String $var * @param string $var
* @access private * @access private
*/ */
function _increment_str(&$var) function _increment_str(&$var)
@ -2083,9 +2083,9 @@ abstract class Base
* @see \phpseclib\Crypt\Base::_setupInlineCrypt() * @see \phpseclib\Crypt\Base::_setupInlineCrypt()
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::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)
*/ */
function _createInlineCryptFunction($cipher_code) function _createInlineCryptFunction($cipher_code)
{ {
@ -2452,7 +2452,7 @@ abstract class Base
* for which $mode the lambda function was created. * for which $mode the lambda function was created.
* *
* @access private * @access private
* @return Array &$functions * @return array &$functions
*/ */
function &_getLambdaFunctions() function &_getLambdaFunctions()
{ {
@ -2466,7 +2466,7 @@ abstract class Base
* @see _setupInlineCrypt() * @see _setupInlineCrypt()
* @access private * @access private
* @param $bytes * @param $bytes
* @return String * @return string
*/ */
function _hashInlineCryptFunction($bytes) function _hashInlineCryptFunction($bytes)
{ {

View File

@ -53,7 +53,7 @@ class Blowfish extends Base
* Block Length of the cipher * Block Length of the cipher
* *
* @see \phpseclib\Crypt\Base::block_size * @see \phpseclib\Crypt\Base::block_size
* @var Integer * @var int
* @access private * @access private
*/ */
var $block_size = 8; var $block_size = 8;
@ -63,7 +63,7 @@ class Blowfish extends Base
* *
* @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::password_key_size
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var Integer * @var int
* @access private * @access private
*/ */
var $password_key_size = 56; var $password_key_size = 56;
@ -72,7 +72,7 @@ class Blowfish extends Base
* The mcrypt specific name of the cipher * The mcrypt specific name of the cipher
* *
* @see \phpseclib\Crypt\Base::cipher_name_mcrypt * @see \phpseclib\Crypt\Base::cipher_name_mcrypt
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_mcrypt = 'blowfish'; var $cipher_name_mcrypt = 'blowfish';
@ -81,7 +81,7 @@ class Blowfish extends Base
* Optimizing value while CFB-encrypting * Optimizing value while CFB-encrypting
* *
* @see \phpseclib\Crypt\Base::cfb_init_len * @see \phpseclib\Crypt\Base::cfb_init_len
* @var Integer * @var int
* @access private * @access private
*/ */
var $cfb_init_len = 500; var $cfb_init_len = 500;
@ -277,7 +277,7 @@ class Blowfish extends Base
/** /**
* Holds the last used key * Holds the last used key
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $kl; var $kl;
@ -295,7 +295,7 @@ class Blowfish extends Base
* *
* @access public * @access public
* @see \phpseclib\Crypt\Base::setKey() * @see \phpseclib\Crypt\Base::setKey()
* @param String $key * @param string $key
*/ */
function setKey($key) function setKey($key)
{ {
@ -316,9 +316,9 @@ class Blowfish extends Base
* This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine()
* *
* @see \phpseclib\Crypt\Base::isValidEngine() * @see \phpseclib\Crypt\Base::isValidEngine()
* @param Integer $engine * @param int $engine
* @access public * @access public
* @return Boolean * @return bool
*/ */
function isValidEngine($engine) function isValidEngine($engine)
{ {
@ -393,8 +393,8 @@ class Blowfish extends Base
* Encrypts a block * Encrypts a block
* *
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _encryptBlock($in) function _encryptBlock($in)
{ {
@ -429,8 +429,8 @@ class Blowfish extends Base
* Decrypts a block * Decrypts a block
* *
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _decryptBlock($in) function _decryptBlock($in)
{ {

View File

@ -72,7 +72,7 @@ class DES extends Base
* Block Length of the cipher * Block Length of the cipher
* *
* @see \phpseclib\Crypt\Base::block_size * @see \phpseclib\Crypt\Base::block_size
* @var Integer * @var int
* @access private * @access private
*/ */
var $block_size = 8; var $block_size = 8;
@ -82,7 +82,7 @@ class DES extends Base
* *
* @see \phpseclib\Crypt\Base::key * @see \phpseclib\Crypt\Base::key
* @see setKey() * @see setKey()
* @var String * @var string
* @access private * @access private
*/ */
var $key = "\0\0\0\0\0\0\0\0"; var $key = "\0\0\0\0\0\0\0\0";
@ -92,7 +92,7 @@ class DES extends Base
* *
* @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::password_key_size
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var Integer * @var int
* @access private * @access private
*/ */
var $password_key_size = 8; var $password_key_size = 8;
@ -101,7 +101,7 @@ class DES extends Base
* The mcrypt specific name of the cipher * The mcrypt specific name of the cipher
* *
* @see \phpseclib\Crypt\Base::cipher_name_mcrypt * @see \phpseclib\Crypt\Base::cipher_name_mcrypt
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_mcrypt = 'des'; var $cipher_name_mcrypt = 'des';
@ -110,7 +110,7 @@ class DES extends Base
* The OpenSSL names of the cipher / modes * The OpenSSL names of the cipher / modes
* *
* @see \phpseclib\Crypt\Base::openssl_mode_names * @see \phpseclib\Crypt\Base::openssl_mode_names
* @var Array * @var array
* @access private * @access private
*/ */
var $openssl_mode_names = array( var $openssl_mode_names = array(
@ -125,7 +125,7 @@ class DES extends Base
* Optimizing value while CFB-encrypting * Optimizing value while CFB-encrypting
* *
* @see \phpseclib\Crypt\Base::cfb_init_len * @see \phpseclib\Crypt\Base::cfb_init_len
* @var Integer * @var int
* @access private * @access private
*/ */
var $cfb_init_len = 500; var $cfb_init_len = 500;
@ -137,7 +137,7 @@ class DES extends Base
* *
* @see \phpseclib\Crypt\DES::_setupKey() * @see \phpseclib\Crypt\DES::_setupKey()
* @see \phpseclib\Crypt\DES::_processBlock() * @see \phpseclib\Crypt\DES::_processBlock()
* @var Integer * @var int
* @access private * @access private
*/ */
var $des_rounds = 1; var $des_rounds = 1;
@ -146,7 +146,7 @@ class DES extends Base
* max possible size of $key * max possible size of $key
* *
* @see \phpseclib\Crypt\DES::setKey() * @see \phpseclib\Crypt\DES::setKey()
* @var String * @var string
* @access private * @access private
*/ */
var $key_size_max = 8; var $key_size_max = 8;
@ -155,7 +155,7 @@ class DES extends Base
* The Key Schedule * The Key Schedule
* *
* @see \phpseclib\Crypt\DES::_setupKey() * @see \phpseclib\Crypt\DES::_setupKey()
* @var Array * @var array
* @access private * @access private
*/ */
var $keys; var $keys;
@ -169,7 +169,7 @@ class DES extends Base
* *
* @see \phpseclib\Crypt\DES::_processBlock() * @see \phpseclib\Crypt\DES::_processBlock()
* @see \phpseclib\Crypt\DES::_setupKey() * @see \phpseclib\Crypt\DES::_setupKey()
* @var Array * @var array
* @access private * @access private
*/ */
var $shuffle = array( var $shuffle = array(
@ -308,7 +308,7 @@ class DES extends Base
* *
* Indexing this table with each source byte performs the initial bit permutation. * Indexing this table with each source byte performs the initial bit permutation.
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $ipmap = array( var $ipmap = array(
@ -350,7 +350,7 @@ class DES extends Base
* Inverse IP mapping helper table. * Inverse IP mapping helper table.
* Indexing this table with a byte value reverses the bit order. * Indexing this table with a byte value reverses the bit order.
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $invipmap = array( var $invipmap = array(
@ -394,7 +394,7 @@ class DES extends Base
* Each box ($sbox1-$sbox8) has been vectorized, then each value pre-permuted using the * Each box ($sbox1-$sbox8) has been vectorized, then each value pre-permuted using the
* P table: concatenation can then be replaced by exclusive ORs. * P table: concatenation can then be replaced by exclusive ORs.
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $sbox1 = array( var $sbox1 = array(
@ -419,7 +419,7 @@ class DES extends Base
/** /**
* Pre-permuted S-box2 * Pre-permuted S-box2
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $sbox2 = array( var $sbox2 = array(
@ -444,7 +444,7 @@ class DES extends Base
/** /**
* Pre-permuted S-box3 * Pre-permuted S-box3
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $sbox3 = array( var $sbox3 = array(
@ -469,7 +469,7 @@ class DES extends Base
/** /**
* Pre-permuted S-box4 * Pre-permuted S-box4
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $sbox4 = array( var $sbox4 = array(
@ -494,7 +494,7 @@ class DES extends Base
/** /**
* Pre-permuted S-box5 * Pre-permuted S-box5
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $sbox5 = array( var $sbox5 = array(
@ -519,7 +519,7 @@ class DES extends Base
/** /**
* Pre-permuted S-box6 * Pre-permuted S-box6
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $sbox6 = array( var $sbox6 = array(
@ -544,7 +544,7 @@ class DES extends Base
/** /**
* Pre-permuted S-box7 * Pre-permuted S-box7
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $sbox7 = array( var $sbox7 = array(
@ -569,7 +569,7 @@ class DES extends Base
/** /**
* Pre-permuted S-box8 * Pre-permuted S-box8
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $sbox8 = array( var $sbox8 = array(
@ -597,9 +597,9 @@ class DES extends Base
* This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine()
* *
* @see \phpseclib\Crypt\Base::isValidEngine() * @see \phpseclib\Crypt\Base::isValidEngine()
* @param Integer $engine * @param int $engine
* @access public * @access public
* @return Boolean * @return bool
*/ */
function isValidEngine($engine) function isValidEngine($engine)
{ {
@ -626,7 +626,7 @@ class DES extends Base
* *
* @see \phpseclib\Crypt\Base::setKey() * @see \phpseclib\Crypt\Base::setKey()
* @access public * @access public
* @param String $key * @param string $key
*/ */
function setKey($key) function setKey($key)
{ {
@ -647,8 +647,8 @@ class DES extends Base
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @see \phpseclib\Crypt\DES::encrypt() * @see \phpseclib\Crypt\DES::encrypt()
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _encryptBlock($in) function _encryptBlock($in)
{ {
@ -662,8 +662,8 @@ class DES extends Base
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @see \phpseclib\Crypt\DES::decrypt() * @see \phpseclib\Crypt\DES::decrypt()
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _decryptBlock($in) function _decryptBlock($in)
{ {
@ -680,9 +680,9 @@ class DES extends Base
* @see \phpseclib\Crypt\DES::_encryptBlock() * @see \phpseclib\Crypt\DES::_encryptBlock()
* @see \phpseclib\Crypt\DES::_decryptBlock() * @see \phpseclib\Crypt\DES::_decryptBlock()
* @access private * @access private
* @param String $block * @param string $block
* @param Integer $mode * @param int $mode
* @return String * @return string
*/ */
function _processBlock($block, $mode) function _processBlock($block, $mode)
{ {

View File

@ -71,7 +71,7 @@ class Hash
* Hash Parameter * Hash Parameter
* *
* @see \phpseclib\Crypt\Hash::setHash() * @see \phpseclib\Crypt\Hash::setHash()
* @var Integer * @var int
* @access private * @access private
*/ */
var $hashParam; var $hashParam;
@ -80,7 +80,7 @@ class Hash
* Byte-length of compression blocks / key (Internal HMAC) * Byte-length of compression blocks / key (Internal HMAC)
* *
* @see \phpseclib\Crypt\Hash::setAlgorithm() * @see \phpseclib\Crypt\Hash::setAlgorithm()
* @var Integer * @var int
* @access private * @access private
*/ */
var $b; var $b;
@ -89,7 +89,7 @@ class Hash
* Byte-length of hash output (Internal HMAC) * Byte-length of hash output (Internal HMAC)
* *
* @see \phpseclib\Crypt\Hash::setHash() * @see \phpseclib\Crypt\Hash::setHash()
* @var Integer * @var int
* @access private * @access private
*/ */
var $l = false; var $l = false;
@ -98,7 +98,7 @@ class Hash
* Hash Algorithm * Hash Algorithm
* *
* @see \phpseclib\Crypt\Hash::setHash() * @see \phpseclib\Crypt\Hash::setHash()
* @var String * @var string
* @access private * @access private
*/ */
var $hash; var $hash;
@ -107,7 +107,7 @@ class Hash
* Key * Key
* *
* @see \phpseclib\Crypt\Hash::setKey() * @see \phpseclib\Crypt\Hash::setKey()
* @var String * @var string
* @access private * @access private
*/ */
var $key = false; var $key = false;
@ -116,7 +116,7 @@ class Hash
* Outer XOR (Internal HMAC) * Outer XOR (Internal HMAC)
* *
* @see \phpseclib\Crypt\Hash::setKey() * @see \phpseclib\Crypt\Hash::setKey()
* @var String * @var string
* @access private * @access private
*/ */
var $opad; var $opad;
@ -125,7 +125,7 @@ class Hash
* Inner XOR (Internal HMAC) * Inner XOR (Internal HMAC)
* *
* @see \phpseclib\Crypt\Hash::setKey() * @see \phpseclib\Crypt\Hash::setKey()
* @var String * @var string
* @access private * @access private
*/ */
var $ipad; var $ipad;
@ -133,7 +133,7 @@ class Hash
/** /**
* Default Constructor. * Default Constructor.
* *
* @param optional String $hash * @param string $hash
* @return \phpseclib\Crypt\Hash * @return \phpseclib\Crypt\Hash
* @access public * @access public
*/ */
@ -161,7 +161,7 @@ class Hash
* Keys can be of any length. * Keys can be of any length.
* *
* @access public * @access public
* @param optional String $key * @param string $key
*/ */
function setKey($key = false) function setKey($key = false)
{ {
@ -174,7 +174,7 @@ class Hash
* As set by the constructor or by the setHash() method. * As set by the constructor or by the setHash() method.
* *
* @access public * @access public
* @return String * @return string
*/ */
function getHash() function getHash()
{ {
@ -185,7 +185,7 @@ class Hash
* Sets the hash function. * Sets the hash function.
* *
* @access public * @access public
* @param String $hash * @param string $hash
*/ */
function setHash($hash) function setHash($hash)
{ {
@ -292,8 +292,8 @@ class Hash
* Compute the HMAC. * Compute the HMAC.
* *
* @access public * @access public
* @param String $text * @param string $text
* @return String * @return string
*/ */
function hash($text) function hash($text)
{ {
@ -342,7 +342,7 @@ class Hash
* Returns the hash length (in bytes) * Returns the hash length (in bytes)
* *
* @access public * @access public
* @return Integer * @return int
*/ */
function getLength() function getLength()
{ {
@ -353,7 +353,7 @@ class Hash
* Wrapper for MD5 * Wrapper for MD5
* *
* @access private * @access private
* @param String $m * @param string $m
*/ */
function _md5($m) function _md5($m)
{ {
@ -364,7 +364,7 @@ class Hash
* Wrapper for SHA1 * Wrapper for SHA1
* *
* @access private * @access private
* @param String $m * @param string $m
*/ */
function _sha1($m) function _sha1($m)
{ {
@ -377,7 +377,7 @@ class Hash
* See {@link http://tools.ietf.org/html/rfc1319 RFC1319}. * See {@link http://tools.ietf.org/html/rfc1319 RFC1319}.
* *
* @access private * @access private
* @param String $m * @param string $m
*/ */
function _md2($m) function _md2($m)
{ {
@ -453,7 +453,7 @@ class Hash
* See {@link http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-256_.28a_SHA-2_variant.29_pseudocode SHA-256 (a SHA-2 variant) pseudocode - Wikipedia}. * See {@link http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-256_.28a_SHA-2_variant.29_pseudocode SHA-256 (a SHA-2 variant) pseudocode - Wikipedia}.
* *
* @access private * @access private
* @param String $m * @param string $m
*/ */
function _sha256($m) function _sha256($m)
{ {
@ -560,7 +560,7 @@ class Hash
* Pure-PHP implementation of SHA384 and SHA512 * Pure-PHP implementation of SHA384 and SHA512
* *
* @access private * @access private
* @param String $m * @param string $m
*/ */
function _sha512($m) function _sha512($m)
{ {
@ -739,10 +739,10 @@ class Hash
* Right Rotate * Right Rotate
* *
* @access private * @access private
* @param Integer $int * @param int $int
* @param Integer $amt * @param int $amt
* @see _sha256() * @see _sha256()
* @return Integer * @return int
*/ */
function _rightRotate($int, $amt) function _rightRotate($int, $amt)
{ {
@ -755,10 +755,10 @@ class Hash
* Right Shift * Right Shift
* *
* @access private * @access private
* @param Integer $int * @param int $int
* @param Integer $amt * @param int $amt
* @see _sha256() * @see _sha256()
* @return Integer * @return int
*/ */
function _rightShift($int, $amt) function _rightShift($int, $amt)
{ {
@ -770,9 +770,9 @@ class Hash
* Not * Not
* *
* @access private * @access private
* @param Integer $int * @param int $int
* @see _sha256() * @see _sha256()
* @return Integer * @return int
*/ */
function _not($int) function _not($int)
{ {
@ -785,8 +785,8 @@ class Hash
* _sha256() adds multiple unsigned 32-bit integers. Since PHP doesn't support unsigned integers and since the * _sha256() adds multiple unsigned 32-bit integers. Since PHP doesn't support unsigned integers and since the
* possibility of overflow exists, care has to be taken. BigInteger could be used but this should be faster. * possibility of overflow exists, care has to be taken. BigInteger could be used but this should be faster.
* *
* @param Integer $... * @param int $...
* @return Integer * @return int
* @see _sha256() * @see _sha256()
* @access private * @access private
*/ */
@ -811,9 +811,9 @@ class Hash
* *
* Inspired by array_shift * Inspired by array_shift
* *
* @param String $string * @param string $string
* @param optional Integer $index * @param int $index
* @return String * @return string
* @access private * @access private
*/ */
function _string_shift(&$string, $index = 1) function _string_shift(&$string, $index = 1)

View File

@ -49,7 +49,7 @@ class RC2 extends Base
* Block Length of the cipher * Block Length of the cipher
* *
* @see \phpseclib\Crypt\Base::block_size * @see \phpseclib\Crypt\Base::block_size
* @var Integer * @var int
* @access private * @access private
*/ */
var $block_size = 8; var $block_size = 8;
@ -59,7 +59,7 @@ class RC2 extends Base
* *
* @see \phpseclib\Crypt\Base::key * @see \phpseclib\Crypt\Base::key
* @see setKey() * @see setKey()
* @var String * @var string
* @access private * @access private
*/ */
var $key; var $key;
@ -71,7 +71,7 @@ class RC2 extends Base
* @see setKey() * @see setKey()
* @see encrypt() * @see encrypt()
* @see decrypt() * @see decrypt()
* @var String * @var string
* @access private * @access private
*/ */
var $orig_key; var $orig_key;
@ -81,7 +81,7 @@ class RC2 extends Base
* *
* @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::password_key_size
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var Integer * @var int
* @access private * @access private
*/ */
var $password_key_size = 16; // = 128 bits var $password_key_size = 16; // = 128 bits
@ -90,7 +90,7 @@ class RC2 extends Base
* The mcrypt specific name of the cipher * The mcrypt specific name of the cipher
* *
* @see \phpseclib\Crypt\Base::cipher_name_mcrypt * @see \phpseclib\Crypt\Base::cipher_name_mcrypt
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_mcrypt = 'rc2'; var $cipher_name_mcrypt = 'rc2';
@ -99,7 +99,7 @@ class RC2 extends Base
* Optimizing value while CFB-encrypting * Optimizing value while CFB-encrypting
* *
* @see \phpseclib\Crypt\Base::cfb_init_len * @see \phpseclib\Crypt\Base::cfb_init_len
* @var Integer * @var int
* @access private * @access private
*/ */
var $cfb_init_len = 500; var $cfb_init_len = 500;
@ -109,7 +109,7 @@ class RC2 extends Base
* *
* @see \phpseclib\Crypt\RC2::setKeyLength() * @see \phpseclib\Crypt\RC2::setKeyLength()
* @see \phpseclib\Crypt\RC2::setKey() * @see \phpseclib\Crypt\RC2::setKey()
* @var Integer * @var int
* @access private * @access private
* @internal Should be in range [1..1024]. * @internal Should be in range [1..1024].
* @internal Changing this value after setting the key has no effect. * @internal Changing this value after setting the key has no effect.
@ -121,7 +121,7 @@ class RC2 extends Base
* *
* @see \phpseclib\Crypt\RC2::isValidEnine() * @see \phpseclib\Crypt\RC2::isValidEnine()
* @see \phpseclib\Crypt\RC2::setKey() * @see \phpseclib\Crypt\RC2::setKey()
* @var Integer * @var int
* @access private * @access private
* @internal Should be in range [1..1024]. * @internal Should be in range [1..1024].
*/ */
@ -131,7 +131,7 @@ class RC2 extends Base
* The Key Schedule * The Key Schedule
* *
* @see \phpseclib\Crypt\RC2::_setupKey() * @see \phpseclib\Crypt\RC2::_setupKey()
* @var Array * @var array
* @access private * @access private
*/ */
var $keys; var $keys;
@ -141,7 +141,7 @@ class RC2 extends Base
* 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 \phpseclib\Crypt\RC2::setKey()
* @var Array * @var array
* @access private * @access private
*/ */
var $pitable = array( var $pitable = array(
@ -215,7 +215,7 @@ class RC2 extends Base
* Inverse key expansion randomization table. * Inverse key expansion randomization table.
* *
* @see \phpseclib\Crypt\RC2::setKey() * @see \phpseclib\Crypt\RC2::setKey()
* @var Array * @var array
* @access private * @access private
*/ */
var $invpitable = array( var $invpitable = array(
@ -259,9 +259,9 @@ class RC2 extends Base
* This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine()
* *
* @see \phpseclib\Crypt\Base::Crypt_Base() * @see \phpseclib\Crypt\Base::Crypt_Base()
* @param Integer $engine * @param int $engine
* @access public * @access public
* @return Boolean * @return bool
*/ */
function isValidEngine($engine) function isValidEngine($engine)
{ {
@ -285,7 +285,7 @@ class RC2 extends Base
* \phpseclib\Crypt\RC2::setKey() call. * \phpseclib\Crypt\RC2::setKey() call.
* *
* @access public * @access public
* @param Integer $length in bits * @param int $length in bits
*/ */
function setKeyLength($length) function setKeyLength($length)
{ {
@ -307,8 +307,8 @@ class RC2 extends Base
* *
* @see \phpseclib\Crypt\Base::setKey() * @see \phpseclib\Crypt\Base::setKey()
* @access public * @access public
* @param String $key * @param string $key
* @param Integer $t1 optional Effective key length in bits. * @param int $t1 optional Effective key length in bits.
*/ */
function setKey($key, $t1 = 0) function setKey($key, $t1 = 0)
{ {
@ -359,8 +359,8 @@ class RC2 extends Base
* *
* @see decrypt() * @see decrypt()
* @access public * @access public
* @param String $plaintext * @param string $plaintext
* @return String $ciphertext * @return string $ciphertext
*/ */
function encrypt($plaintext) function encrypt($plaintext)
{ {
@ -382,8 +382,8 @@ class RC2 extends Base
* *
* @see encrypt() * @see encrypt()
* @access public * @access public
* @param String $ciphertext * @param string $ciphertext
* @return String $plaintext * @return string $plaintext
*/ */
function decrypt($ciphertext) function decrypt($ciphertext)
{ {
@ -404,8 +404,8 @@ class RC2 extends Base
* @see \phpseclib\Crypt\Base::_encryptBlock() * @see \phpseclib\Crypt\Base::_encryptBlock()
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _encryptBlock($in) function _encryptBlock($in)
{ {
@ -449,8 +449,8 @@ class RC2 extends Base
* @see \phpseclib\Crypt\Base::_decryptBlock() * @see \phpseclib\Crypt\Base::_decryptBlock()
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _decryptBlock($in) function _decryptBlock($in)
{ {

View File

@ -70,7 +70,7 @@ class RC4 extends Base
* so we the block_size to 0 * so we the block_size to 0
* *
* @see \phpseclib\Crypt\Base::block_size * @see \phpseclib\Crypt\Base::block_size
* @var Integer * @var int
* @access private * @access private
*/ */
var $block_size = 0; var $block_size = 0;
@ -80,7 +80,7 @@ class RC4 extends Base
* *
* @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::password_key_size
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var Integer * @var int
* @access private * @access private
*/ */
var $password_key_size = 128; // = 1024 bits var $password_key_size = 128; // = 1024 bits
@ -89,7 +89,7 @@ class RC4 extends Base
* The mcrypt specific name of the cipher * The mcrypt specific name of the cipher
* *
* @see \phpseclib\Crypt\Base::cipher_name_mcrypt * @see \phpseclib\Crypt\Base::cipher_name_mcrypt
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_mcrypt = 'arcfour'; var $cipher_name_mcrypt = 'arcfour';
@ -107,7 +107,7 @@ class RC4 extends Base
* The Key * The Key
* *
* @see \phpseclib\Crypt\RC4::setKey() * @see \phpseclib\Crypt\RC4::setKey()
* @var String * @var string
* @access private * @access private
*/ */
var $key = "\0"; var $key = "\0";
@ -116,7 +116,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 \phpseclib\Crypt\RC4::setKey()
* @var Array * @var array
* @access private * @access private
*/ */
var $stream; var $stream;
@ -141,9 +141,9 @@ class RC4 extends Base
* This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine()
* *
* @see Crypt_Base::Crypt_Base() * @see Crypt_Base::Crypt_Base()
* @param Integer $engine * @param int $engine
* @access public * @access public
* @return Boolean * @return bool
*/ */
function isValidEngine($engine) function isValidEngine($engine)
{ {
@ -182,7 +182,7 @@ class RC4 extends Base
* {@link http://www.rsa.com/rsalabs/node.asp?id=2009 http://www.rsa.com/rsalabs/node.asp?id=2009} * {@link http://www.rsa.com/rsalabs/node.asp?id=2009 http://www.rsa.com/rsalabs/node.asp?id=2009}
* {@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 \phpseclib\Crypt\RC4::setKey()
* @access public * @access public
*/ */
@ -198,7 +198,7 @@ class RC4 extends Base
* *
* @access public * @access public
* @see \phpseclib\Crypt\Base::setKey() * @see \phpseclib\Crypt\Base::setKey()
* @param String $key * @param string $key
*/ */
function setKey($key) function setKey($key)
{ {
@ -211,8 +211,8 @@ class RC4 extends Base
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @see \phpseclib\Crypt\RC4::_crypt() * @see \phpseclib\Crypt\RC4::_crypt()
* @access public * @access public
* @param String $plaintext * @param string $plaintext
* @return String $ciphertext * @return string $ciphertext
*/ */
function encrypt($plaintext) function encrypt($plaintext)
{ {
@ -231,8 +231,8 @@ class RC4 extends Base
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @see \phpseclib\Crypt\RC4::_crypt() * @see \phpseclib\Crypt\RC4::_crypt()
* @access public * @access public
* @param String $ciphertext * @param string $ciphertext
* @return String $plaintext * @return string $plaintext
*/ */
function decrypt($ciphertext) function decrypt($ciphertext)
{ {
@ -246,7 +246,7 @@ class RC4 extends Base
* Encrypts a block * Encrypts a block
* *
* @access private * @access private
* @param String $in * @param string $in
*/ */
function _encryptBlock($in) function _encryptBlock($in)
{ {
@ -257,7 +257,7 @@ class RC4 extends Base
* Decrypts a block * Decrypts a block
* *
* @access private * @access private
* @param String $in * @param string $in
*/ */
function _decryptBlock($in) function _decryptBlock($in)
{ {
@ -297,9 +297,9 @@ class RC4 extends Base
* @see \phpseclib\Crypt\RC4::encrypt() * @see \phpseclib\Crypt\RC4::encrypt()
* @see \phpseclib\Crypt\RC4::decrypt() * @see \phpseclib\Crypt\RC4::decrypt()
* @access private * @access private
* @param String $text * @param string $text
* @param Integer $mode * @param int $mode
* @return String $text * @return string $text
*/ */
function _crypt($text, $mode) function _crypt($text, $mode)
{ {

View File

@ -252,7 +252,7 @@ class RSA
/** /**
* Precomputed Zero * Precomputed Zero
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $zero; var $zero;
@ -260,7 +260,7 @@ class RSA
/** /**
* Precomputed One * Precomputed One
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $one; var $one;
@ -268,7 +268,7 @@ class RSA
/** /**
* Private Key Format * Private Key Format
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $privateKeyFormat = self::PRIVATE_FORMAT_PKCS1; var $privateKeyFormat = self::PRIVATE_FORMAT_PKCS1;
@ -276,7 +276,7 @@ class RSA
/** /**
* Public Key Format * Public Key Format
* *
* @var Integer * @var int
* @access public * @access public
*/ */
var $publicKeyFormat = self::PUBLIC_FORMAT_PKCS8; var $publicKeyFormat = self::PUBLIC_FORMAT_PKCS8;
@ -308,7 +308,7 @@ class RSA
/** /**
* Primes for Chinese Remainder Theorem (ie. p and q) * Primes for Chinese Remainder Theorem (ie. p and q)
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $primes; var $primes;
@ -316,7 +316,7 @@ class RSA
/** /**
* Exponents for Chinese Remainder Theorem (ie. dP and dQ) * Exponents for Chinese Remainder Theorem (ie. dP and dQ)
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $exponents; var $exponents;
@ -324,7 +324,7 @@ class RSA
/** /**
* Coefficients for Chinese Remainder Theorem (ie. qInv) * Coefficients for Chinese Remainder Theorem (ie. qInv)
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $coefficients; var $coefficients;
@ -332,7 +332,7 @@ class RSA
/** /**
* Hash name * Hash name
* *
* @var String * @var string
* @access private * @access private
*/ */
var $hashName; var $hashName;
@ -348,7 +348,7 @@ class RSA
/** /**
* Length of hash function output * Length of hash function output
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $hLen; var $hLen;
@ -356,7 +356,7 @@ class RSA
/** /**
* Length of salt * Length of salt
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $sLen; var $sLen;
@ -372,7 +372,7 @@ class RSA
/** /**
* Length of MGF hash function output * Length of MGF hash function output
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $mgfHLen; var $mgfHLen;
@ -380,7 +380,7 @@ class RSA
/** /**
* Encryption mode * Encryption mode
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $encryptionMode = self::ENCRYPTION_OAEP; var $encryptionMode = self::ENCRYPTION_OAEP;
@ -388,7 +388,7 @@ class RSA
/** /**
* Signature mode * Signature mode
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $signatureMode = self::SIGNATURE_PSS; var $signatureMode = self::SIGNATURE_PSS;
@ -396,7 +396,7 @@ class RSA
/** /**
* Public Exponent * Public Exponent
* *
* @var Mixed * @var mixed
* @access private * @access private
*/ */
var $publicExponent = false; var $publicExponent = false;
@ -404,7 +404,7 @@ class RSA
/** /**
* Password * Password
* *
* @var String * @var string
* @access private * @access private
*/ */
var $password = false; var $password = false;
@ -416,7 +416,7 @@ class RSA
* because PHP's XML Parser functions work on PHP4 whereas PHP's DOM functions - although surperior - don't. * because PHP's XML Parser functions work on PHP4 whereas PHP's DOM functions - although surperior - don't.
* *
* @see \phpseclib\Crypt\RSA::_start_element_handler() * @see \phpseclib\Crypt\RSA::_start_element_handler()
* @var Array * @var array
* @access private * @access private
*/ */
var $components = array(); var $components = array();
@ -428,7 +428,7 @@ class RSA
* *
* @see \phpseclib\Crypt\RSA::_character_handler() * @see \phpseclib\Crypt\RSA::_character_handler()
* @see \phpseclib\Crypt\RSA::_stop_element_handler() * @see \phpseclib\Crypt\RSA::_stop_element_handler()
* @var Mixed * @var mixed
* @access private * @access private
*/ */
var $current; var $current;
@ -438,7 +438,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 \phpseclib\Crypt\RSA::createKey()
* @var Mixed * @var mixed
* @Access public * @Access public
*/ */
var $configFile; var $configFile;
@ -446,7 +446,7 @@ class RSA
/** /**
* Public key comment field. * Public key comment field.
* *
* @var String * @var string
* @access private * @access private
*/ */
var $comment = 'phpseclib-generated-key'; var $comment = 'phpseclib-generated-key';
@ -537,9 +537,9 @@ class RSA
* Will need to be passed back to \phpseclib\Crypt\RSA::createKey() as the third parameter for further processing. * Will need to be passed back to \phpseclib\Crypt\RSA::createKey() as the third parameter for further processing.
* *
* @access public * @access public
* @param optional Integer $bits * @param int $bits
* @param optional Integer $timeout * @param int $timeout
* @param optional array $p * @param array $p
*/ */
function createKey($bits = 1024, $timeout = false, $partial = array()) function createKey($bits = 1024, $timeout = false, $partial = array())
{ {
@ -718,8 +718,8 @@ class RSA
* *
* @access private * @access private
* @see setPrivateKeyFormat() * @see setPrivateKeyFormat()
* @param String $RSAPrivateKey * @param string $RSAPrivateKey
* @return String * @return string
*/ */
function _convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients) function _convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients)
{ {
@ -947,8 +947,8 @@ class RSA
* *
* @access private * @access private
* @see setPublicKeyFormat() * @see setPublicKeyFormat()
* @param String $RSAPrivateKey * @param string $RSAPrivateKey
* @return String * @return string
*/ */
function _convertPublicKey($n, $e) function _convertPublicKey($n, $e)
{ {
@ -1026,9 +1026,9 @@ class RSA
* @access private * @access private
* @see _convertPublicKey() * @see _convertPublicKey()
* @see _convertPrivateKey() * @see _convertPrivateKey()
* @param String $key * @param string $key
* @param Integer $type * @param int $type
* @return Array * @return array
*/ */
function _parseKey($key, $type) function _parseKey($key, $type)
{ {
@ -1423,7 +1423,7 @@ class RSA
* More specifically, this returns the size of the modulo in bits. * More specifically, this returns the size of the modulo in bits.
* *
* @access public * @access public
* @return Integer * @return int
*/ */
function getSize() function getSize()
{ {
@ -1436,9 +1436,9 @@ class RSA
* Called by xml_set_element_handler() * Called by xml_set_element_handler()
* *
* @access private * @access private
* @param Resource $parser * @param resource $parser
* @param String $name * @param string $name
* @param Array $attribs * @param array $attribs
*/ */
function _start_element_handler($parser, $name, $attribs) function _start_element_handler($parser, $name, $attribs)
{ {
@ -1477,8 +1477,8 @@ class RSA
* Called by xml_set_element_handler() * Called by xml_set_element_handler()
* *
* @access private * @access private
* @param Resource $parser * @param resource $parser
* @param String $name * @param string $name
*/ */
function _stop_element_handler($parser, $name) function _stop_element_handler($parser, $name)
{ {
@ -1494,8 +1494,8 @@ class RSA
* Called by xml_set_character_data_handler() * Called by xml_set_character_data_handler()
* *
* @access private * @access private
* @param Resource $parser * @param resource $parser
* @param String $data * @param string $data
*/ */
function _data_handler($parser, $data) function _data_handler($parser, $data)
{ {
@ -1511,8 +1511,8 @@ class RSA
* Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed) * Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed)
* *
* @access public * @access public
* @param String $key * @param string $key
* @param Integer $type optional * @param int $type optional
*/ */
function loadKey($key, $type = false) function loadKey($key, $type = false)
{ {
@ -1629,7 +1629,7 @@ class RSA
* @see createKey() * @see createKey()
* @see loadKey() * @see loadKey()
* @access public * @access public
* @param String $password * @param string $password
*/ */
function setPassword($password = false) function setPassword($password = false)
{ {
@ -1653,9 +1653,9 @@ class RSA
* *
* @see getPublicKey() * @see getPublicKey()
* @access public * @access public
* @param String $key optional * @param string $key optional
* @param Integer $type optional * @param int $type optional
* @return Boolean * @return bool
*/ */
function setPublicKey($key = false, $type = false) function setPublicKey($key = false, $type = false)
{ {
@ -1713,9 +1713,9 @@ class RSA
* *
* @see getPublicKey() * @see getPublicKey()
* @access public * @access public
* @param String $key optional * @param string $key optional
* @param Integer $type optional * @param int $type optional
* @return Boolean * @return bool
*/ */
function setPrivateKey($key = false, $type = false) function setPrivateKey($key = false, $type = false)
{ {
@ -1744,8 +1744,8 @@ class RSA
* *
* @see getPublicKey() * @see getPublicKey()
* @access public * @access public
* @param String $key * @param string $key
* @param Integer $type optional * @param int $type optional
*/ */
function getPublicKey($type = self::PUBLIC_FORMAT_PKCS8) function getPublicKey($type = self::PUBLIC_FORMAT_PKCS8)
{ {
@ -1768,7 +1768,7 @@ class RSA
* Example output (md5): "c1:b1:30:29:d7:b8:de:6c:97:77:10:d7:46:41:63:87" (as specified by RFC 4716) * Example output (md5): "c1:b1:30:29:d7:b8:de:6c:97:77:10:d7:46:41:63:87" (as specified by RFC 4716)
* *
* @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.
*/ */
public function getPublicKeyFingerprint($algorithm = 'md5') public function getPublicKeyFingerprint($algorithm = 'md5')
@ -1802,8 +1802,8 @@ class RSA
* *
* @see getPublicKey() * @see getPublicKey()
* @access public * @access public
* @param String $key * @param string $key
* @param Integer $type optional * @param int $type optional
*/ */
function getPrivateKey($type = self::PUBLIC_FORMAT_PKCS1) function getPrivateKey($type = self::PUBLIC_FORMAT_PKCS1)
{ {
@ -1826,8 +1826,8 @@ class RSA
* *
* @see getPrivateKey() * @see getPrivateKey()
* @access private * @access private
* @param String $key * @param string $key
* @param Integer $type optional * @param int $type optional
*/ */
function _getPrivatePublicKey($mode = self::PUBLIC_FORMAT_PKCS8) function _getPrivatePublicKey($mode = self::PUBLIC_FORMAT_PKCS8)
{ {
@ -1873,8 +1873,8 @@ class RSA
* Generates the smallest and largest numbers requiring $bits bits * Generates the smallest and largest numbers requiring $bits bits
* *
* @access private * @access private
* @param Integer $bits * @param int $bits
* @return Array * @return array
*/ */
function _generateMinMax($bits) function _generateMinMax($bits)
{ {
@ -1902,8 +1902,8 @@ class RSA
* {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information. * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information.
* *
* @access private * @access private
* @param String $string * @param string $string
* @return Integer * @return int
*/ */
function _decodeLength(&$string) function _decodeLength(&$string)
{ {
@ -1923,8 +1923,8 @@ class RSA
* {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information. * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information.
* *
* @access private * @access private
* @param Integer $length * @param int $length
* @return String * @return string
*/ */
function _encodeLength($length) function _encodeLength($length)
{ {
@ -1941,9 +1941,9 @@ class RSA
* *
* Inspired by array_shift * Inspired by array_shift
* *
* @param String $string * @param string $string
* @param optional Integer $index * @param int $index
* @return String * @return string
* @access private * @access private
*/ */
function _string_shift(&$string, $index = 1) function _string_shift(&$string, $index = 1)
@ -1958,7 +1958,7 @@ class RSA
* *
* @see createKey() * @see createKey()
* @access public * @access public
* @param Integer $format * @param int $format
*/ */
function setPrivateKeyFormat($format) function setPrivateKeyFormat($format)
{ {
@ -1970,7 +1970,7 @@ class RSA
* *
* @see createKey() * @see createKey()
* @access public * @access public
* @param Integer $format * @param int $format
*/ */
function setPublicKeyFormat($format) function setPublicKeyFormat($format)
{ {
@ -1984,7 +1984,7 @@ class RSA
* decryption. If $hash isn't supported, sha1 is used. * decryption. If $hash isn't supported, sha1 is used.
* *
* @access public * @access public
* @param String $hash * @param string $hash
*/ */
function setHash($hash) function setHash($hash)
{ {
@ -2013,7 +2013,7 @@ class RSA
* best if Hash and MGFHash are set to the same thing this is not a requirement. * best if Hash and MGFHash are set to the same thing this is not a requirement.
* *
* @access public * @access public
* @param String $hash * @param string $hash
*/ */
function setMGFHash($hash) function setMGFHash($hash)
{ {
@ -2042,7 +2042,7 @@ class RSA
* of the hash function Hash) and 0. * of the hash function Hash) and 0.
* *
* @access public * @access public
* @param Integer $format * @param int $format
*/ */
function setSaltLength($sLen) function setSaltLength($sLen)
{ {
@ -2056,8 +2056,8 @@ class RSA
* *
* @access private * @access private
* @param \phpseclib\Math\BigInteger $x * @param \phpseclib\Math\BigInteger $x
* @param Integer $xLen * @param int $xLen
* @return String * @return string
*/ */
function _i2osp($x, $xLen) function _i2osp($x, $xLen)
{ {
@ -2075,7 +2075,7 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}. * See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}.
* *
* @access private * @access private
* @param String $x * @param string $x
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
*/ */
function _os2ip($x) function _os2ip($x)
@ -2169,7 +2169,7 @@ class RSA
* @access private * @access private
* @param \phpseclib\Math\BigInteger $x * @param \phpseclib\Math\BigInteger $x
* @param \phpseclib\Math\BigInteger $r * @param \phpseclib\Math\BigInteger $r
* @param Integer $i * @param int $i
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
*/ */
function _blind($x, $r, $i) function _blind($x, $r, $i)
@ -2194,9 +2194,9 @@ class RSA
* Thanks for the heads up singpolyma! * Thanks for the heads up singpolyma!
* *
* @access private * @access private
* @param String $x * @param string $x
* @param String $y * @param string $y
* @return Boolean * @return bool
*/ */
function _equals($x, $y) function _equals($x, $y)
{ {
@ -2290,9 +2290,9 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#appendix-B.2.1 RFC3447#appendix-B.2.1}. * See {@link http://tools.ietf.org/html/rfc3447#appendix-B.2.1 RFC3447#appendix-B.2.1}.
* *
* @access private * @access private
* @param String $mgfSeed * @param string $mgfSeed
* @param Integer $mgfLen * @param int $mgfLen
* @return String * @return string
*/ */
function _mgf1($mgfSeed, $maskLen) function _mgf1($mgfSeed, $maskLen)
{ {
@ -2315,9 +2315,9 @@ class RSA
* {http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding OAES}. * {http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding OAES}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @param String $l * @param string $l
* @return String * @return string
*/ */
function _rsaes_oaep_encrypt($m, $l = '') function _rsaes_oaep_encrypt($m, $l = '')
{ {
@ -2378,9 +2378,9 @@ class RSA
* this document. * this document.
* *
* @access private * @access private
* @param String $c * @param string $c
* @param String $l * @param string $l
* @return String * @return string
*/ */
function _rsaes_oaep_decrypt($c, $l = '') function _rsaes_oaep_decrypt($c, $l = '')
{ {
@ -2437,8 +2437,8 @@ class RSA
* Doesn't use padding and is not recommended. * Doesn't use padding and is not recommended.
* *
* @access private * @access private
* @param String $m * @param string $m
* @return String * @return string
*/ */
function _raw_encrypt($m) function _raw_encrypt($m)
{ {
@ -2453,8 +2453,8 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-7.2.1 RFC3447#section-7.2.1}. * See {@link http://tools.ietf.org/html/rfc3447#section-7.2.1 RFC3447#section-7.2.1}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @return String * @return string
*/ */
function _rsaes_pkcs1_v1_5_encrypt($m) function _rsaes_pkcs1_v1_5_encrypt($m)
{ {
@ -2512,8 +2512,8 @@ class RSA
* not private key encrypted ciphertext's. * not private key encrypted ciphertext's.
* *
* @access private * @access private
* @param String $c * @param string $c
* @return String * @return string
*/ */
function _rsaes_pkcs1_v1_5_decrypt($c) function _rsaes_pkcs1_v1_5_decrypt($c)
{ {
@ -2561,8 +2561,8 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-9.1.1 RFC3447#section-9.1.1}. * See {@link http://tools.ietf.org/html/rfc3447#section-9.1.1 RFC3447#section-9.1.1}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @param Integer $emBits * @param int $emBits
*/ */
function _emsa_pss_encode($m, $emBits) function _emsa_pss_encode($m, $emBits)
{ {
@ -2597,10 +2597,10 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-9.1.2 RFC3447#section-9.1.2}. * See {@link http://tools.ietf.org/html/rfc3447#section-9.1.2 RFC3447#section-9.1.2}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @param String $em * @param string $em
* @param Integer $emBits * @param int $emBits
* @return String * @return string
*/ */
function _emsa_pss_verify($m, $em, $emBits) function _emsa_pss_verify($m, $em, $emBits)
{ {
@ -2644,8 +2644,8 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-8.1.1 RFC3447#section-8.1.1}. * See {@link http://tools.ietf.org/html/rfc3447#section-8.1.1 RFC3447#section-8.1.1}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @return String * @return string
*/ */
function _rsassa_pss_sign($m) function _rsassa_pss_sign($m)
{ {
@ -2670,9 +2670,9 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-8.1.2 RFC3447#section-8.1.2}. * See {@link http://tools.ietf.org/html/rfc3447#section-8.1.2 RFC3447#section-8.1.2}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @param String $s * @param string $s
* @return String * @return string
*/ */
function _rsassa_pss_verify($m, $s) function _rsassa_pss_verify($m, $s)
{ {
@ -2710,9 +2710,9 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-9.2 RFC3447#section-9.2}. * See {@link http://tools.ietf.org/html/rfc3447#section-9.2 RFC3447#section-9.2}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @param Integer $emLen * @param int $emLen
* @return String * @return string
*/ */
function _emsa_pkcs1_v1_5_encode($m, $emLen) function _emsa_pkcs1_v1_5_encode($m, $emLen)
{ {
@ -2762,8 +2762,8 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-8.2.1 RFC3447#section-8.2.1}. * See {@link http://tools.ietf.org/html/rfc3447#section-8.2.1 RFC3447#section-8.2.1}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @return String * @return string
*/ */
function _rsassa_pkcs1_v1_5_sign($m) function _rsassa_pkcs1_v1_5_sign($m)
{ {
@ -2792,8 +2792,8 @@ class RSA
* See {@link http://tools.ietf.org/html/rfc3447#section-8.2.2 RFC3447#section-8.2.2}. * See {@link http://tools.ietf.org/html/rfc3447#section-8.2.2 RFC3447#section-8.2.2}.
* *
* @access private * @access private
* @param String $m * @param string $m
* @return String * @return string
*/ */
function _rsassa_pkcs1_v1_5_verify($m, $s) function _rsassa_pkcs1_v1_5_verify($m, $s)
{ {
@ -2836,7 +2836,7 @@ class RSA
* Valid values include self::ENCRYPTION_OAEP and self::ENCRYPTION_PKCS1. * Valid values include self::ENCRYPTION_OAEP and self::ENCRYPTION_PKCS1.
* *
* @access public * @access public
* @param Integer $mode * @param int $mode
*/ */
function setEncryptionMode($mode) function setEncryptionMode($mode)
{ {
@ -2849,7 +2849,7 @@ class RSA
* Valid values include self::SIGNATURE_PSS and self::SIGNATURE_PKCS1 * Valid values include self::SIGNATURE_PSS and self::SIGNATURE_PKCS1
* *
* @access public * @access public
* @param Integer $mode * @param int $mode
*/ */
function setSignatureMode($mode) function setSignatureMode($mode)
{ {
@ -2860,7 +2860,7 @@ class RSA
* Set public key comment. * Set public key comment.
* *
* @access public * @access public
* @param String $comment * @param string $comment
*/ */
function setComment($comment) function setComment($comment)
{ {
@ -2871,7 +2871,7 @@ class RSA
* Get public key comment. * Get public key comment.
* *
* @access public * @access public
* @return String * @return string
*/ */
function getComment() function getComment()
{ {
@ -2887,8 +2887,8 @@ class RSA
* *
* @see decrypt() * @see decrypt()
* @access public * @access public
* @param String $plaintext * @param string $plaintext
* @return String * @return string
*/ */
function encrypt($plaintext) function encrypt($plaintext)
{ {
@ -2933,8 +2933,8 @@ class RSA
* *
* @see encrypt() * @see encrypt()
* @access public * @access public
* @param String $plaintext * @param string $plaintext
* @return String * @return string
*/ */
function decrypt($ciphertext) function decrypt($ciphertext)
{ {
@ -2975,8 +2975,8 @@ class RSA
* *
* @see verify() * @see verify()
* @access public * @access public
* @param String $message * @param string $message
* @return String * @return string
*/ */
function sign($message) function sign($message)
{ {
@ -2998,9 +2998,9 @@ class RSA
* *
* @see sign() * @see sign()
* @access public * @access public
* @param String $message * @param string $message
* @param String $signature * @param string $signature
* @return Boolean * @return bool
*/ */
function verify($message, $signature) function verify($message, $signature)
{ {
@ -3021,8 +3021,8 @@ class RSA
* Extract raw BER from Base64 encoding * Extract raw BER from Base64 encoding
* *
* @access private * @access private
* @param String $str * @param string $str
* @return String * @return string
*/ */
function _extractBER($str) function _extractBER($str)
{ {

View File

@ -48,8 +48,8 @@ class Random
* microoptimizations because this function has the potential of being called a huge number of times. * microoptimizations because this function has the potential of being called a huge number of times.
* eg. for RSA key generation. * eg. for RSA key generation.
* *
* @param Integer $length * @param int $length
* @return String * @return string
*/ */
public static function string($length) public static function string($length)
{ {

View File

@ -70,7 +70,7 @@ class Rijndael extends Base
* *
* @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::password_key_size
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var Integer * @var int
* @access private * @access private
*/ */
var $password_key_size = 16; var $password_key_size = 16;
@ -86,7 +86,7 @@ class Rijndael extends Base
* @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 isValidEngine()
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_mcrypt = 'rijndael-128'; var $cipher_name_mcrypt = 'rijndael-128';
@ -96,7 +96,7 @@ class Rijndael extends Base
* *
* @see \phpseclib\Crypt\Base::password_default_salt * @see \phpseclib\Crypt\Base::password_default_salt
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var String * @var string
* @access private * @access private
*/ */
var $password_default_salt = 'phpseclib'; var $password_default_salt = 'phpseclib';
@ -105,7 +105,7 @@ class Rijndael extends 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 setKeyLength()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $explicit_key_length = false; var $explicit_key_length = false;
@ -114,7 +114,7 @@ class Rijndael extends Base
* The Key Schedule * The Key Schedule
* *
* @see _setup() * @see _setup()
* @var Array * @var array
* @access private * @access private
*/ */
var $w; var $w;
@ -123,7 +123,7 @@ class Rijndael extends Base
* The Inverse Key Schedule * The Inverse Key Schedule
* *
* @see _setup() * @see _setup()
* @var Array * @var array
* @access private * @access private
*/ */
var $dw; var $dw;
@ -132,7 +132,7 @@ class Rijndael extends Base
* The Block Length divided by 32 * The Block Length divided by 32
* *
* @see setBlockLength() * @see setBlockLength()
* @var Integer * @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
* because the encryption / decryption / key schedule creation requires this number and not $block_size. We could * because the encryption / decryption / key schedule creation requires this number and not $block_size. We could
@ -145,7 +145,7 @@ class Rijndael extends Base
* The Key Length * The Key Length
* *
* @see setKeyLength() * @see setKeyLength()
* @var Integer * @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_size. We could
@ -158,7 +158,7 @@ class Rijndael extends Base
* The Key Length divided by 32 * The Key Length divided by 32
* *
* @see setKeyLength() * @see setKeyLength()
* @var Integer * @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
*/ */
@ -167,7 +167,7 @@ class Rijndael extends Base
/** /**
* The Number of Rounds * The Number of Rounds
* *
* @var Integer * @var int
* @access private * @access private
* @internal The max value is 14, the min value is 10. * @internal The max value is 14, the min value is 10.
*/ */
@ -176,7 +176,7 @@ class Rijndael extends Base
/** /**
* Shift offsets * Shift offsets
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $c; var $c;
@ -184,7 +184,7 @@ class Rijndael extends Base
/** /**
* Holds the last used key- and block_size information * Holds the last used key- and block_size information
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $kl; var $kl;
@ -209,7 +209,7 @@ class Rijndael extends Base
* If not explictly set, \phpseclib\Crypt\Base::MODE_CBC will be used. * If not explictly set, \phpseclib\Crypt\Base::MODE_CBC will be used.
* *
* @see \phpseclib\Crypt\Base::Crypt_Base() * @see \phpseclib\Crypt\Base::Crypt_Base()
* @param optional Integer $mode * @param int $mode
* @access public * @access public
/** /**
@ -227,7 +227,7 @@ class Rijndael extends Base
* @see \phpseclib\Crypt\Base:setKey() * @see \phpseclib\Crypt\Base:setKey()
* @see setKeyLength() * @see setKeyLength()
* @access public * @access public
* @param String $key * @param string $key
*/ */
function setKey($key) function setKey($key)
{ {
@ -271,7 +271,7 @@ class Rijndael extends Base
* This results then in slower encryption. * This results then in slower encryption.
* *
* @access public * @access public
* @param Integer $length * @param int $length
*/ */
function setKeyLength($length) function setKeyLength($length)
{ {
@ -304,7 +304,7 @@ class Rijndael extends Base
* 128. If the length is greater than 128 and invalid, it will be rounded down to the closest valid amount. * 128. If the length is greater than 128 and invalid, it will be rounded down to the closest valid amount.
* *
* @access public * @access public
* @param Integer $length * @param int $length
*/ */
function setBlockLength($length) function setBlockLength($length)
{ {
@ -326,9 +326,9 @@ class Rijndael extends Base
* This is mainly just a wrapper to set things up for \phpseclib\Crypt\Base::isValidEngine() * This is mainly just a wrapper to set things up for \phpseclib\Crypt\Base::isValidEngine()
* *
* @see \phpseclib\Crypt\Base::Crypt_Base() * @see \phpseclib\Crypt\Base::Crypt_Base()
* @param Integer $engine * @param int $engine
* @access public * @access public
* @return Boolean * @return bool
*/ */
function isValidEngine($engine) function isValidEngine($engine)
{ {
@ -367,8 +367,8 @@ class Rijndael extends Base
* Encrypts a block * Encrypts a block
* *
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _encryptBlock($in) function _encryptBlock($in)
{ {
@ -468,8 +468,8 @@ class Rijndael extends Base
* Decrypts a block * Decrypts a block
* *
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _decryptBlock($in) function _decryptBlock($in)
{ {
@ -673,7 +673,7 @@ class Rijndael extends Base
* Performs S-Box substitutions * Performs S-Box substitutions
* *
* @access private * @access private
* @param Integer $word * @param int $word
*/ */
function _subWord($word) function _subWord($word)
{ {
@ -695,7 +695,7 @@ class Rijndael extends Base
* @see Crypt_Rijndael:_setupInlineCrypt() * @see Crypt_Rijndael:_setupInlineCrypt()
* @see Crypt_Rijndael:_subWord() * @see Crypt_Rijndael:_subWord()
* @access private * @access private
* @return Array &$tables * @return array &$tables
*/ */
function &_getTables() function &_getTables()
{ {
@ -784,7 +784,7 @@ class Rijndael extends Base
* @see Crypt_Rijndael:_setupInlineCrypt() * @see Crypt_Rijndael:_setupInlineCrypt()
* @see Crypt_Rijndael:_setupKey() * @see Crypt_Rijndael:_setupKey()
* @access private * @access private
* @return Array &$tables * @return array &$tables
*/ */
function &_getInvTables() function &_getInvTables()
{ {

View File

@ -69,7 +69,7 @@ class TripleDES extends DES
* @see \phpseclib\Crypt\DES::password_key_size * @see \phpseclib\Crypt\DES::password_key_size
* @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::password_key_size
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var Integer * @var int
* @access private * @access private
*/ */
var $password_key_size = 24; var $password_key_size = 24;
@ -79,7 +79,7 @@ class TripleDES extends DES
* *
* @see \phpseclib\Crypt\Base::password_default_salt * @see \phpseclib\Crypt\Base::password_default_salt
* @see \phpseclib\Crypt\Base::setPassword() * @see \phpseclib\Crypt\Base::setPassword()
* @var String * @var string
* @access private * @access private
*/ */
var $password_default_salt = 'phpseclib'; var $password_default_salt = 'phpseclib';
@ -89,7 +89,7 @@ class TripleDES extends DES
* *
* @see \phpseclib\Crypt\DES::cipher_name_mcrypt * @see \phpseclib\Crypt\DES::cipher_name_mcrypt
* @see \phpseclib\Crypt\Base::cipher_name_mcrypt * @see \phpseclib\Crypt\Base::cipher_name_mcrypt
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_mcrypt = 'tripledes'; var $cipher_name_mcrypt = 'tripledes';
@ -98,7 +98,7 @@ class TripleDES extends DES
* Optimizing value while CFB-encrypting * Optimizing value while CFB-encrypting
* *
* @see \phpseclib\Crypt\Base::cfb_init_len * @see \phpseclib\Crypt\Base::cfb_init_len
* @var Integer * @var int
* @access private * @access private
*/ */
var $cfb_init_len = 750; var $cfb_init_len = 750;
@ -108,7 +108,7 @@ class TripleDES extends DES
* *
* @see \phpseclib\Crypt\TripleDES::setKey() * @see \phpseclib\Crypt\TripleDES::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_size_max = 24;
@ -116,7 +116,7 @@ class TripleDES extends DES
/** /**
* Internal flag whether using self::MODE_3CBC or not * Internal flag whether using self::MODE_3CBC or not
* *
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $mode_3cbc; var $mode_3cbc;
@ -126,7 +126,7 @@ class TripleDES extends DES
* *
* Used only if $mode_3cbc === true * Used only if $mode_3cbc === true
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $des; var $des;
@ -154,7 +154,7 @@ class TripleDES extends DES
* *
* @see \phpseclib\Crypt\DES::__construct() * @see \phpseclib\Crypt\DES::__construct()
* @see \phpseclib\Crypt\Base::__construct() * @see \phpseclib\Crypt\Base::__construct()
* @param optional Integer $mode * @param int $mode
* @access public * @access public
*/ */
function __construct($mode = Base::MODE_CBC) function __construct($mode = Base::MODE_CBC)
@ -190,9 +190,9 @@ class TripleDES extends DES
* This is mainly just a wrapper to set things up for \phpseclib\Crypt\Base::isValidEngine() * This is mainly just a wrapper to set things up for \phpseclib\Crypt\Base::isValidEngine()
* *
* @see \phpseclib\Crypt\Base::Crypt_Base() * @see \phpseclib\Crypt\Base::Crypt_Base()
* @param Integer $engine * @param int $engine
* @access public * @access public
* @return Boolean * @return bool
*/ */
function isValidEngine($engine) function isValidEngine($engine)
{ {
@ -213,7 +213,7 @@ class TripleDES extends DES
* *
* @see \phpseclib\Crypt\Base::setIV() * @see \phpseclib\Crypt\Base::setIV()
* @access public * @access public
* @param String $iv * @param string $iv
*/ */
function setIV($iv) function setIV($iv)
{ {
@ -238,7 +238,7 @@ class TripleDES extends DES
* @access public * @access public
* @see \phpseclib\Crypt\DES::setKey() * @see \phpseclib\Crypt\DES::setKey()
* @see \phpseclib\Crypt\Base::setKey() * @see \phpseclib\Crypt\Base::setKey()
* @param String $key * @param string $key
*/ */
function setKey($key) function setKey($key)
{ {
@ -269,8 +269,8 @@ class TripleDES extends DES
* *
* @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::encrypt()
* @access public * @access public
* @param String $plaintext * @param string $plaintext
* @return String $cipertext * @return string $cipertext
*/ */
function encrypt($plaintext) function encrypt($plaintext)
{ {
@ -296,8 +296,8 @@ class TripleDES extends DES
* *
* @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::decrypt()
* @access public * @access public
* @param String $ciphertext * @param string $ciphertext
* @return String $plaintext * @return string $plaintext
*/ */
function decrypt($ciphertext) function decrypt($ciphertext)
{ {
@ -423,9 +423,9 @@ class TripleDES extends DES
* *
* @see \phpseclib\Crypt\Base::Crypt_Base() * @see \phpseclib\Crypt\Base::Crypt_Base()
* @see \phpseclib\Crypt\Base::setPreferredEngine() * @see \phpseclib\Crypt\Base::setPreferredEngine()
* @param Integer $engine * @param int $engine
* @access public * @access public
* @return Integer * @return int
*/ */
function setPreferredEngine($engine) function setPreferredEngine($engine)
{ {

View File

@ -53,7 +53,7 @@ class Twofish extends Base
* The mcrypt specific name of the cipher * The mcrypt specific name of the cipher
* *
* @see \phpseclib\Crypt\Base::cipher_name_mcrypt * @see \phpseclib\Crypt\Base::cipher_name_mcrypt
* @var String * @var string
* @access private * @access private
*/ */
var $cipher_name_mcrypt = 'twofish'; var $cipher_name_mcrypt = 'twofish';
@ -62,7 +62,7 @@ class Twofish extends Base
* Optimizing value while CFB-encrypting * Optimizing value while CFB-encrypting
* *
* @see \phpseclib\Crypt\Base::cfb_init_len * @see \phpseclib\Crypt\Base::cfb_init_len
* @var Integer * @var int
* @access private * @access private
*/ */
var $cfb_init_len = 800; var $cfb_init_len = 800;
@ -70,7 +70,7 @@ class Twofish extends Base
/** /**
* Q-Table * Q-Table
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $q0 = array ( var $q0 = array (
@ -111,7 +111,7 @@ class Twofish extends Base
/** /**
* Q-Table * Q-Table
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $q1 = array ( var $q1 = array (
@ -152,7 +152,7 @@ class Twofish extends Base
/** /**
* M-Table * M-Table
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $m0 = array ( var $m0 = array (
@ -193,7 +193,7 @@ class Twofish extends Base
/** /**
* M-Table * M-Table
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $m1 = array ( var $m1 = array (
@ -234,7 +234,7 @@ class Twofish extends Base
/** /**
* M-Table * M-Table
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $m2 = array ( var $m2 = array (
@ -275,7 +275,7 @@ class Twofish extends Base
/** /**
* M-Table * M-Table
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $m3 = array ( var $m3 = array (
@ -316,7 +316,7 @@ class Twofish extends Base
/** /**
* The Key Schedule Array * The Key Schedule Array
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $K = array(); var $K = array();
@ -324,7 +324,7 @@ class Twofish extends Base
/** /**
* The Key depended S-Table 0 * The Key depended S-Table 0
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $S0 = array(); var $S0 = array();
@ -332,7 +332,7 @@ class Twofish extends Base
/** /**
* The Key depended S-Table 1 * The Key depended S-Table 1
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $S1 = array(); var $S1 = array();
@ -340,7 +340,7 @@ class Twofish extends Base
/** /**
* The Key depended S-Table 2 * The Key depended S-Table 2
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $S2 = array(); var $S2 = array();
@ -348,7 +348,7 @@ class Twofish extends Base
/** /**
* The Key depended S-Table 3 * The Key depended S-Table 3
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $S3 = array(); var $S3 = array();
@ -356,7 +356,7 @@ class Twofish extends Base
/** /**
* Holds the last used key * Holds the last used key
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $kl; var $kl;
@ -372,7 +372,7 @@ class Twofish extends Base
* *
* @access public * @access public
* @see \phpseclib\Crypt\Base::setKey() * @see \phpseclib\Crypt\Base::setKey()
* @param String $key * @param string $key
*/ */
function setKey($key) function setKey($key)
{ {
@ -504,9 +504,9 @@ class Twofish extends Base
* _mdsrem function using by the twofish cipher algorithm * _mdsrem function using by the twofish cipher algorithm
* *
* @access private * @access private
* @param String $A * @param string $A
* @param String $B * @param string $B
* @return Array * @return array
*/ */
function _mdsrem($A, $B) function _mdsrem($A, $B)
{ {
@ -552,8 +552,8 @@ class Twofish extends Base
* Encrypts a block * Encrypts a block
* *
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _encryptBlock($in) function _encryptBlock($in)
{ {
@ -608,8 +608,8 @@ class Twofish extends Base
* Decrypts a block * Decrypts a block
* *
* @access private * @access private
* @param String $in * @param string $in
* @return String * @return string
*/ */
function _decryptBlock($in) function _decryptBlock($in)
{ {

View File

@ -32,7 +32,7 @@ class ANSI
/** /**
* Max Width * Max Width
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $max_x; var $max_x;
@ -40,7 +40,7 @@ class ANSI
/** /**
* Max Height * Max Height
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $max_y; var $max_y;
@ -48,7 +48,7 @@ class ANSI
/** /**
* Max History * Max History
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $max_history; var $max_history;
@ -56,7 +56,7 @@ class ANSI
/** /**
* History * History
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $history; var $history;
@ -64,7 +64,7 @@ class ANSI
/** /**
* History Attributes * History Attributes
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $history_attrs; var $history_attrs;
@ -72,7 +72,7 @@ class ANSI
/** /**
* Current Column * Current Column
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $x; var $x;
@ -80,7 +80,7 @@ class ANSI
/** /**
* Current Row * Current Row
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $y; var $y;
@ -88,7 +88,7 @@ class ANSI
/** /**
* Old Column * Old Column
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $old_x; var $old_x;
@ -96,7 +96,7 @@ class ANSI
/** /**
* Old Row * Old Row
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $old_y; var $old_y;
@ -104,7 +104,7 @@ class ANSI
/** /**
* An empty attribute cell * An empty attribute cell
* *
* @var Object * @var object
* @access private * @access private
*/ */
var $base_attr_cell; var $base_attr_cell;
@ -112,7 +112,7 @@ class ANSI
/** /**
* The current attribute cell * The current attribute cell
* *
* @var Object * @var object
* @access private * @access private
*/ */
var $attr_cell; var $attr_cell;
@ -120,7 +120,7 @@ class ANSI
/** /**
* An empty attribute row * An empty attribute row
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $attr_row; var $attr_row;
@ -128,7 +128,7 @@ class ANSI
/** /**
* The current screen text * The current screen text
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $screen; var $screen;
@ -136,7 +136,7 @@ class ANSI
/** /**
* The current screen attributes * The current screen attributes
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $attrs; var $attrs;
@ -144,7 +144,7 @@ class ANSI
/** /**
* Current ANSI code * Current ANSI code
* *
* @var String * @var string
* @access private * @access private
*/ */
var $ansi; var $ansi;
@ -152,7 +152,7 @@ class ANSI
/** /**
* Tokenization * Tokenization
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $tokenization; var $tokenization;
@ -184,8 +184,8 @@ class ANSI
* *
* Resets the screen as well * Resets the screen as well
* *
* @param Integer $x * @param int $x
* @param Integer $y * @param int $y
* @access public * @access public
*/ */
function setDimensions($x, $y) function setDimensions($x, $y)
@ -203,8 +203,8 @@ class ANSI
/** /**
* Set the number of lines that should be logged past the terminal height * Set the number of lines that should be logged past the terminal height
* *
* @param Integer $x * @param int $x
* @param Integer $y * @param int $y
* @access public * @access public
*/ */
function setHistory($history) function setHistory($history)
@ -215,7 +215,7 @@ class ANSI
/** /**
* Load a string * Load a string
* *
* @param String $source * @param string $source
* @access public * @access public
*/ */
function loadString($source) function loadString($source)
@ -227,7 +227,7 @@ class ANSI
/** /**
* Appdend a string * Appdend a string
* *
* @param String $source * @param string $source
* @access public * @access public
*/ */
function appendString($source) function appendString($source)
@ -458,7 +458,7 @@ class ANSI
* Returns the current coordinate without preformating * Returns the current coordinate without preformating
* *
* @access private * @access private
* @return String * @return string
*/ */
function _processCoordinate($last_attr, $cur_attr, $char) function _processCoordinate($last_attr, $cur_attr, $char)
{ {
@ -515,7 +515,7 @@ class ANSI
* Returns the current screen without preformating * Returns the current screen without preformating
* *
* @access private * @access private
* @return String * @return string
*/ */
function _getScreen() function _getScreen()
{ {
@ -539,7 +539,7 @@ class ANSI
* Returns the current screen * Returns the current screen
* *
* @access public * @access public
* @return String * @return string
*/ */
function getScreen() function getScreen()
{ {
@ -550,7 +550,7 @@ class ANSI
* Returns the current screen and the x previous lines * Returns the current screen and the x previous lines
* *
* @access public * @access public
* @return String * @return string
*/ */
function getHistory() function getHistory()
{ {

View File

@ -104,7 +104,7 @@ class ASN1
/** /**
* ASN.1 object identifier * ASN.1 object identifier
* *
* @var Array * @var array
* @access private * @access private
* @link http://en.wikipedia.org/wiki/Object_identifier * @link http://en.wikipedia.org/wiki/Object_identifier
*/ */
@ -113,7 +113,7 @@ class ASN1
/** /**
* Default date format * Default date format
* *
* @var String * @var string
* @access private * @access private
* @link http://php.net/class.datetime * @link http://php.net/class.datetime
*/ */
@ -122,7 +122,7 @@ class ASN1
/** /**
* Default date format * Default date format
* *
* @var Array * @var array
* @access private * @access private
* @see \phpseclib\File\ASN1::setTimeFormat() * @see \phpseclib\File\ASN1::setTimeFormat()
* @see \phpseclib\File\ASN1::asn1map() * @see \phpseclib\File\ASN1::asn1map()
@ -135,7 +135,7 @@ class ASN1
* *
* If the mapping type is self::TYPE_ANY what do we actually encode it as? * If the mapping type is self::TYPE_ANY what do we actually encode it as?
* *
* @var Array * @var array
* @access private * @access private
* @see \phpseclib\File\ASN1::_encode_der() * @see \phpseclib\File\ASN1::_encode_der()
*/ */
@ -148,7 +148,7 @@ class ASN1
* Unambiguous types get the direct mapping (int/real/bool). * Unambiguous types get the direct mapping (int/real/bool).
* Others are mapped as a choice, with an extra indexing level. * Others are mapped as a choice, with an extra indexing level.
* *
* @var Array * @var array
* @access public * @access public
*/ */
var $ANYmap = array( var $ANYmap = array(
@ -182,7 +182,7 @@ class ASN1
* Non-convertable types are absent from this table. * Non-convertable types are absent from this table.
* size == 0 indicates variable length encoding. * size == 0 indicates variable length encoding.
* *
* @var Array * @var array
* @access public * @access public
*/ */
var $stringTypeSize = array( var $stringTypeSize = array(
@ -200,8 +200,8 @@ class ASN1
* *
* Serves a similar purpose to openssl's asn1parse * Serves a similar purpose to openssl's asn1parse
* *
* @param String $encoded * @param string $encoded
* @return Array * @return array
* @access public * @access public
*/ */
function decodeBER($encoded) function decodeBER($encoded)
@ -222,9 +222,9 @@ class ASN1
* $encoded is passed by reference for the recursive calls done for self::TYPE_BIT_STRING and * $encoded is passed by reference for the recursive calls done for self::TYPE_BIT_STRING and
* self::TYPE_OCTET_STRING. In those cases, the indefinite length is used. * self::TYPE_OCTET_STRING. In those cases, the indefinite length is used.
* *
* @param String $encoded * @param string $encoded
* @param Integer $start * @param int $start
* @return Array * @return array
* @access private * @access private
*/ */
function _decode_ber($encoded, $start = 0) function _decode_ber($encoded, $start = 0)
@ -482,10 +482,10 @@ class ASN1
* *
* "Special" mappings may be applied on a per tag-name basis via $special. * "Special" mappings may be applied on a per tag-name basis via $special.
* *
* @param Array $decoded * @param array $decoded
* @param Array $mapping * @param array $mapping
* @param Array $special * @param array $special
* @return Array * @return array
* @access public * @access public
*/ */
function asn1map($decoded, $mapping, $special = array()) function asn1map($decoded, $mapping, $special = array())
@ -774,10 +774,10 @@ class ASN1
* *
* "Special" mappings can be applied via $special. * "Special" mappings can be applied via $special.
* *
* @param String $source * @param string $source
* @param String $mapping * @param string $mapping
* @param Integer $idx * @param int $idx
* @return String * @return string
* @access public * @access public
*/ */
function encodeDER($source, $mapping, $special = array()) function encodeDER($source, $mapping, $special = array())
@ -789,10 +789,10 @@ class ASN1
/** /**
* ASN.1 Encode (Helper function) * ASN.1 Encode (Helper function)
* *
* @param String $source * @param string $source
* @param String $mapping * @param string $mapping
* @param Integer $idx * @param int $idx
* @return String * @return string
* @access private * @access private
*/ */
function _encode_der($source, $mapping, $idx = null, $special = array()) function _encode_der($source, $mapping, $idx = null, $special = array())
@ -1089,8 +1089,8 @@ class ASN1
* {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information. * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information.
* *
* @access private * @access private
* @param Integer $length * @param int $length
* @return String * @return string
*/ */
function _encodeLength($length) function _encodeLength($length)
{ {
@ -1108,9 +1108,9 @@ class ASN1
* Called by _decode_ber() and in the case of implicit tags asn1map(). * Called by _decode_ber() and in the case of implicit tags asn1map().
* *
* @access private * @access private
* @param String $content * @param string $content
* @param Integer $tag * @param int $tag
* @return String * @return string
*/ */
function _decodeTime($content, $tag) function _decodeTime($content, $tag)
{ {
@ -1157,7 +1157,7 @@ class ASN1
* Sets the time / date format for asn1map(). * Sets the time / date format for asn1map().
* *
* @access public * @access public
* @param String $format * @param string $format
*/ */
function setTimeFormat($format) function setTimeFormat($format)
{ {
@ -1170,7 +1170,7 @@ class ASN1
* Load the relevant OIDs for a particular ASN.1 semantic mapping. * Load the relevant OIDs for a particular ASN.1 semantic mapping.
* *
* @access public * @access public
* @param Array $oids * @param array $oids
*/ */
function loadOIDs($oids) function loadOIDs($oids)
{ {
@ -1183,7 +1183,7 @@ class ASN1
* See \phpseclib\File\X509, etc, for an example. * See \phpseclib\File\X509, etc, for an example.
* *
* @access public * @access public
* @param Array $filters * @param array $filters
*/ */
function loadFilters($filters) function loadFilters($filters)
{ {
@ -1195,9 +1195,9 @@ class ASN1
* *
* Inspired by array_shift * Inspired by array_shift
* *
* @param String $string * @param string $string
* @param optional Integer $index * @param int $index
* @return String * @return string
* @access private * @access private
*/ */
function _string_shift(&$string, $index = 1) function _string_shift(&$string, $index = 1)
@ -1213,10 +1213,10 @@ class ASN1
* This is a lazy conversion, dealing only with character size. * This is a lazy conversion, dealing only with character size.
* No real conversion table is used. * No real conversion table is used.
* *
* @param String $in * @param string $in
* @param optional Integer $from * @param int $from
* @param optional Integer $to * @param int $to
* @return String * @return string
* @access public * @access public
*/ */
function convert($in, $from = self::TYPE_UTF8_STRING, $to = self::TYPE_UTF8_STRING) function convert($in, $from = self::TYPE_UTF8_STRING, $to = self::TYPE_UTF8_STRING)

View File

@ -28,7 +28,7 @@ class Element
/** /**
* Raw element value * Raw element value
* *
* @var String * @var string
* @access private * @access private
*/ */
var $element; var $element;
@ -36,7 +36,7 @@ class Element
/** /**
* Constructor * Constructor
* *
* @param String $encoded * @param string $encoded
* @return \phpseclib\File\ASN1\Element * @return \phpseclib\File\ASN1\Element
* @access public * @access public
*/ */

View File

@ -116,7 +116,7 @@ class X509
/** /**
* ASN.1 syntax for X.509 certificates * ASN.1 syntax for X.509 certificates
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $Certificate; var $Certificate;
@ -165,7 +165,7 @@ class X509
/** /**
* ASN.1 syntax for Certificate Signing Requests (RFC2986) * ASN.1 syntax for Certificate Signing Requests (RFC2986)
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $CertificationRequest; var $CertificationRequest;
@ -173,7 +173,7 @@ class X509
/** /**
* ASN.1 syntax for Certificate Revocation Lists (RFC5280) * ASN.1 syntax for Certificate Revocation Lists (RFC5280)
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $CertificateList; var $CertificateList;
@ -181,7 +181,7 @@ class X509
/** /**
* Distinguished Name * Distinguished Name
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $dn; var $dn;
@ -189,7 +189,7 @@ class X509
/** /**
* Public key * Public key
* *
* @var String * @var string
* @access private * @access private
*/ */
var $publicKey; var $publicKey;
@ -197,7 +197,7 @@ class X509
/** /**
* Private key * Private key
* *
* @var String * @var string
* @access private * @access private
*/ */
var $privateKey; var $privateKey;
@ -205,7 +205,7 @@ class X509
/** /**
* Object identifiers for X.509 certificates * Object identifiers for X.509 certificates
* *
* @var Array * @var array
* @access private * @access private
* @link http://en.wikipedia.org/wiki/Object_identifier * @link http://en.wikipedia.org/wiki/Object_identifier
*/ */
@ -214,7 +214,7 @@ class X509
/** /**
* The certificate authorities * The certificate authorities
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $CAs; var $CAs;
@ -222,7 +222,7 @@ class X509
/** /**
* The currently loaded certificate * The currently loaded certificate
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $currentCert; var $currentCert;
@ -233,7 +233,7 @@ class X509
* There's no guarantee \phpseclib\File\X509 is going to reencode an X.509 cert in the same way it was originally * There's no guarantee \phpseclib\File\X509 is going to reencode an X.509 cert in the same way it was originally
* encoded so we take save the portion of the original cert that the signature would have made for. * encoded so we take save the portion of the original cert that the signature would have made for.
* *
* @var String * @var string
* @access private * @access private
*/ */
var $signatureSubject; var $signatureSubject;
@ -241,7 +241,7 @@ class X509
/** /**
* Certificate Start Date * Certificate Start Date
* *
* @var String * @var string
* @access private * @access private
*/ */
var $startDate; var $startDate;
@ -249,7 +249,7 @@ class X509
/** /**
* Certificate End Date * Certificate End Date
* *
* @var String * @var string
* @access private * @access private
*/ */
var $endDate; var $endDate;
@ -257,7 +257,7 @@ class X509
/** /**
* Serial Number * Serial Number
* *
* @var String * @var string
* @access private * @access private
*/ */
var $serialNumber; var $serialNumber;
@ -268,7 +268,7 @@ class X509
* See {@link http://tools.ietf.org/html/rfc5280#section-4.2.1.1 RFC5280#section-4.2.1.1} and * See {@link http://tools.ietf.org/html/rfc5280#section-4.2.1.1 RFC5280#section-4.2.1.1} and
* {@link http://tools.ietf.org/html/rfc5280#section-4.2.1.2 RFC5280#section-4.2.1.2}. * {@link http://tools.ietf.org/html/rfc5280#section-4.2.1.2 RFC5280#section-4.2.1.2}.
* *
* @var String * @var string
* @access private * @access private
*/ */
var $currentKeyIdentifier; var $currentKeyIdentifier;
@ -276,7 +276,7 @@ class X509
/** /**
* CA Flag * CA Flag
* *
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $caFlag = false; var $caFlag = false;
@ -284,7 +284,7 @@ class X509
/** /**
* SPKAC Challenge * SPKAC Challenge
* *
* @var String * @var string
* @access private * @access private
*/ */
var $challenge; var $challenge;
@ -1402,9 +1402,9 @@ class X509
* *
* Returns an associative array describing the X.509 cert or a false if the cert failed to load * Returns an associative array describing the X.509 cert or a false if the cert failed to load
* *
* @param String $cert * @param string $cert
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function loadX509($cert) function loadX509($cert)
{ {
@ -1464,10 +1464,10 @@ class X509
/** /**
* Save X.509 certificate * Save X.509 certificate
* *
* @param Array $cert * @param array $cert
* @param Integer $format optional * @param int $format optional
* @access public * @access public
* @return String * @return string
*/ */
function saveX509($cert, $format = self::FORMAT_PEM) function saveX509($cert, $format = self::FORMAT_PEM)
{ {
@ -1540,9 +1540,9 @@ class X509
* Map extension values from octet string to extension-specific internal * Map extension values from octet string to extension-specific internal
* format. * format.
* *
* @param Array ref $root * @param array ref $root
* @param String $path * @param string $path
* @param Object $asn1 * @param object $asn1
* @access private * @access private
*/ */
function _mapInExtensions(&$root, $path, $asn1) function _mapInExtensions(&$root, $path, $asn1)
@ -1590,9 +1590,9 @@ class X509
* Map extension values from extension-specific internal format to * Map extension values from extension-specific internal format to
* octet string. * octet string.
* *
* @param Array ref $root * @param array ref $root
* @param String $path * @param string $path
* @param Object $asn1 * @param object $asn1
* @access private * @access private
*/ */
function _mapOutExtensions(&$root, $path, $asn1) function _mapOutExtensions(&$root, $path, $asn1)
@ -1656,9 +1656,9 @@ class X509
* Map attribute values from ANY type to attribute-specific internal * Map attribute values from ANY type to attribute-specific internal
* format. * format.
* *
* @param Array ref $root * @param array ref $root
* @param String $path * @param string $path
* @param Object $asn1 * @param object $asn1
* @access private * @access private
*/ */
function _mapInAttributes(&$root, $path, $asn1) function _mapInAttributes(&$root, $path, $asn1)
@ -1697,9 +1697,9 @@ class X509
* Map attribute values from attribute-specific internal format to * Map attribute values from attribute-specific internal format to
* ANY type. * ANY type.
* *
* @param Array ref $root * @param array ref $root
* @param String $path * @param string $path
* @param Object $asn1 * @param object $asn1
* @access private * @access private
*/ */
function _mapOutAttributes(&$root, $path, $asn1) function _mapOutAttributes(&$root, $path, $asn1)
@ -1739,9 +1739,9 @@ class X509
/** /**
* Associate an extension ID to an extension mapping * Associate an extension ID to an extension mapping
* *
* @param String $extnId * @param string $extnId
* @access private * @access private
* @return Mixed * @return mixed
*/ */
function _getMapping($extnId) function _getMapping($extnId)
{ {
@ -1835,9 +1835,9 @@ class X509
/** /**
* Load an X.509 certificate as a certificate authority * Load an X.509 certificate as a certificate authority
* *
* @param String $cert * @param string $cert
* @access public * @access public
* @return Boolean * @return bool
*/ */
function loadCA($cert) function loadCA($cert)
{ {
@ -1902,9 +1902,9 @@ class X509
* component or component fragment. E.g., *.a.com matches foo.a.com but * component or component fragment. E.g., *.a.com matches foo.a.com but
* not bar.foo.a.com. f*.com matches foo.com but not bar.com. * not bar.foo.a.com. f*.com matches foo.com but not bar.com.
* *
* @param String $url * @param string $url
* @access public * @access public
* @return Boolean * @return bool
*/ */
function validateURL($url) function validateURL($url)
{ {
@ -1960,7 +1960,7 @@ class X509
* *
* If $date isn't defined it is assumed to be the current date. * If $date isn't defined it is assumed to be the current date.
* *
* @param Integer $date optional * @param int $date optional
* @access public * @access public
*/ */
function validateDate($date = null) function validateDate($date = null)
@ -1999,9 +1999,9 @@ class X509
* *
* The behavior of this function is inspired by {@link http://php.net/openssl-verify openssl_verify}. * The behavior of this function is inspired by {@link http://php.net/openssl-verify openssl_verify}.
* *
* @param Boolean $caonly optional * @param bool $caonly optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function validateSignature($caonly = true) function validateSignature($caonly = true)
{ {
@ -2109,13 +2109,13 @@ class X509
* *
* Returns true if the signature is verified, false if it is not correct or null on error * Returns true if the signature is verified, false if it is not correct or null on error
* *
* @param String $publicKeyAlgorithm * @param string $publicKeyAlgorithm
* @param String $publicKey * @param string $publicKey
* @param String $signatureAlgorithm * @param string $signatureAlgorithm
* @param String $signature * @param string $signature
* @param String $signatureSubject * @param string $signatureSubject
* @access private * @access private
* @return Integer * @return int
*/ */
function _validateSignature($publicKeyAlgorithm, $publicKey, $signatureAlgorithm, $signature, $signatureSubject) function _validateSignature($publicKeyAlgorithm, $publicKey, $signatureAlgorithm, $signature, $signatureSubject)
{ {
@ -2154,10 +2154,10 @@ class X509
* *
* Reformats a public key to a format supported by phpseclib (if applicable) * Reformats a public key to a format supported by phpseclib (if applicable)
* *
* @param String $algorithm * @param string $algorithm
* @param String $key * @param string $key
* @access private * @access private
* @return String * @return string
*/ */
function _reformatKey($algorithm, $key) function _reformatKey($algorithm, $key)
{ {
@ -2180,9 +2180,9 @@ class X509
* *
* Takes in a base64 encoded "blob" and returns a human readable IP address * Takes in a base64 encoded "blob" and returns a human readable IP address
* *
* @param String $ip * @param string $ip
* @access private * @access private
* @return String * @return string
*/ */
function _decodeIP($ip) function _decodeIP($ip)
{ {
@ -2196,9 +2196,9 @@ class X509
* *
* Takes a human readable IP address into a base64-encoded "blob" * Takes a human readable IP address into a base64-encoded "blob"
* *
* @param String $ip * @param string $ip
* @access private * @access private
* @return String * @return string
*/ */
function _encodeIP($ip) function _encodeIP($ip)
{ {
@ -2208,9 +2208,9 @@ class X509
/** /**
* "Normalizes" a Distinguished Name property * "Normalizes" a Distinguished Name property
* *
* @param String $propName * @param string $propName
* @access private * @access private
* @return Mixed * @return mixed
*/ */
function _translateDNProp($propName) function _translateDNProp($propName)
{ {
@ -2297,11 +2297,11 @@ class X509
/** /**
* Set a Distinguished Name property * Set a Distinguished Name property
* *
* @param String $propName * @param string $propName
* @param Mixed $propValue * @param mixed $propValue
* @param String $type optional * @param string $type optional
* @access public * @access public
* @return Boolean * @return bool
*/ */
function setDNProp($propName, $propValue, $type = 'utf8String') function setDNProp($propName, $propValue, $type = 'utf8String')
{ {
@ -2331,7 +2331,7 @@ class X509
/** /**
* Remove Distinguished Name properties * Remove Distinguished Name properties
* *
* @param String $propName * @param string $propName
* @access public * @access public
*/ */
function removeDNProp($propName) function removeDNProp($propName)
@ -2358,10 +2358,10 @@ class X509
/** /**
* Get Distinguished Name properties * Get Distinguished Name properties
* *
* @param String $propName * @param string $propName
* @param Array $dn optional * @param array $dn optional
* @param Boolean $withType optional * @param bool $withType optional
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function getDNProp($propName, $dn = null, $withType = false) function getDNProp($propName, $dn = null, $withType = false)
@ -2409,11 +2409,11 @@ class X509
/** /**
* Set a Distinguished Name * Set a Distinguished Name
* *
* @param Mixed $dn * @param mixed $dn
* @param Boolean $merge optional * @param bool $merge optional
* @param String $type optional * @param string $type optional
* @access public * @access public
* @return Boolean * @return bool
*/ */
function setDN($dn, $merge = false, $type = 'utf8String') function setDN($dn, $merge = false, $type = 'utf8String')
{ {
@ -2452,10 +2452,10 @@ class X509
/** /**
* Get the Distinguished Name for a certificates subject * Get the Distinguished Name for a certificates subject
* *
* @param Mixed $format optional * @param mixed $format optional
* @param Array $dn optional * @param array $dn optional
* @access public * @access public
* @return Boolean * @return bool
*/ */
function getDN($format = self::DN_ARRAY, $dn = null) function getDN($format = self::DN_ARRAY, $dn = null)
{ {
@ -2595,9 +2595,9 @@ class X509
/** /**
* Get the Distinguished Name for a certificate/crl issuer * Get the Distinguished Name for a certificate/crl issuer
* *
* @param Integer $format optional * @param int $format optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getIssuerDN($format = self::DN_ARRAY) function getIssuerDN($format = self::DN_ARRAY)
{ {
@ -2617,9 +2617,9 @@ class X509
* Get the Distinguished Name for a certificate/csr subject * Get the Distinguished Name for a certificate/csr subject
* Alias of getDN() * Alias of getDN()
* *
* @param Integer $format optional * @param int $format optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getSubjectDN($format = self::DN_ARRAY) function getSubjectDN($format = self::DN_ARRAY)
{ {
@ -2640,10 +2640,10 @@ class X509
/** /**
* Get an individual Distinguished Name property for a certificate/crl issuer * Get an individual Distinguished Name property for a certificate/crl issuer
* *
* @param String $propName * @param string $propName
* @param Boolean $withType optional * @param bool $withType optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getIssuerDNProp($propName, $withType = false) function getIssuerDNProp($propName, $withType = false)
{ {
@ -2662,10 +2662,10 @@ class X509
/** /**
* Get an individual Distinguished Name property for a certificate/csr subject * Get an individual Distinguished Name property for a certificate/csr subject
* *
* @param String $propName * @param string $propName
* @param Boolean $withType optional * @param bool $withType optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getSubjectDNProp($propName, $withType = false) function getSubjectDNProp($propName, $withType = false)
{ {
@ -2687,7 +2687,7 @@ class X509
* Get the certificate chain for the current cert * Get the certificate chain for the current cert
* *
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getChain() function getChain()
{ {
@ -2733,9 +2733,9 @@ class X509
* *
* Key needs to be a \phpseclib\Crypt\RSA object * Key needs to be a \phpseclib\Crypt\RSA object
* *
* @param Object $key * @param object $key
* @access public * @access public
* @return Boolean * @return bool
*/ */
function setPublicKey($key) function setPublicKey($key)
{ {
@ -2748,7 +2748,7 @@ class X509
* *
* Key needs to be a \phpseclib\Crypt\RSA object * Key needs to be a \phpseclib\Crypt\RSA object
* *
* @param Object $key * @param object $key
* @access public * @access public
*/ */
function setPrivateKey($key) function setPrivateKey($key)
@ -2761,7 +2761,7 @@ class X509
* *
* Used for SPKAC CSR's * Used for SPKAC CSR's
* *
* @param String $challenge * @param string $challenge
* @access public * @access public
*/ */
function setChallenge($challenge) function setChallenge($challenge)
@ -2775,7 +2775,7 @@ class X509
* Returns a \phpseclib\Crypt\RSA object or a false. * Returns a \phpseclib\Crypt\RSA object or a false.
* *
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getPublicKey() function getPublicKey()
{ {
@ -2813,9 +2813,9 @@ class X509
/** /**
* Load a Certificate Signing Request * Load a Certificate Signing Request
* *
* @param String $csr * @param string $csr
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function loadCSR($csr) function loadCSR($csr)
{ {
@ -2886,10 +2886,10 @@ class X509
/** /**
* Save CSR request * Save CSR request
* *
* @param Array $csr * @param array $csr
* @param Integer $format optional * @param int $format optional
* @access public * @access public
* @return String * @return string
*/ */
function saveCSR($csr, $format = self::FORMAT_PEM) function saveCSR($csr, $format = self::FORMAT_PEM)
{ {
@ -2938,9 +2938,9 @@ class X509
* *
* https://developer.mozilla.org/en-US/docs/HTML/Element/keygen * https://developer.mozilla.org/en-US/docs/HTML/Element/keygen
* *
* @param String $csr * @param string $csr
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function loadSPKAC($spkac) function loadSPKAC($spkac)
{ {
@ -3009,10 +3009,10 @@ class X509
/** /**
* Save a SPKAC CSR request * Save a SPKAC CSR request
* *
* @param Array $csr * @param array $csr
* @param Integer $format optional * @param int $format optional
* @access public * @access public
* @return String * @return string
*/ */
function saveSPKAC($spkac, $format = self::FORMAT_PEM) function saveSPKAC($spkac, $format = self::FORMAT_PEM)
{ {
@ -3052,9 +3052,9 @@ class X509
/** /**
* Load a Certificate Revocation List * Load a Certificate Revocation List
* *
* @param String $crl * @param string $crl
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function loadCRL($crl) function loadCRL($crl)
{ {
@ -3107,10 +3107,10 @@ class X509
/** /**
* Save Certificate Revocation List. * Save Certificate Revocation List.
* *
* @param Array $crl * @param array $crl
* @param Integer $format optional * @param int $format optional
* @access public * @access public
* @return String * @return string
*/ */
function saveCRL($crl, $format = self::FORMAT_PEM) function saveCRL($crl, $format = self::FORMAT_PEM)
{ {
@ -3169,9 +3169,9 @@ class X509
* - 5.1.2.6 Revoked Certificates * - 5.1.2.6 Revoked Certificates
* by choosing utcTime iff year of date given is before 2050 and generalTime else. * by choosing utcTime iff year of date given is before 2050 and generalTime else.
* *
* @param String $date in format date('D, d M Y H:i:s O') * @param string $date in format date('D, d M Y H:i:s O')
* @access private * @access private
* @return Array * @return array
*/ */
function _timeField($date) function _timeField($date)
{ {
@ -3192,9 +3192,9 @@ class X509
* *
* @param \phpseclib\File\X509 $issuer * @param \phpseclib\File\X509 $issuer
* @param \phpseclib\File\X509 $subject * @param \phpseclib\File\X509 $subject
* @param String $signatureAlgorithm optional * @param string $signatureAlgorithm optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function sign($issuer, $subject, $signatureAlgorithm = 'sha1WithRSAEncryption') function sign($issuer, $subject, $signatureAlgorithm = 'sha1WithRSAEncryption')
{ {
@ -3371,7 +3371,7 @@ class X509
* Sign a CSR * Sign a CSR
* *
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function signCSR($signatureAlgorithm = 'sha1WithRSAEncryption') function signCSR($signatureAlgorithm = 'sha1WithRSAEncryption')
{ {
@ -3429,7 +3429,7 @@ class X509
* Sign a SPKAC * Sign a SPKAC
* *
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function signSPKAC($signatureAlgorithm = 'sha1WithRSAEncryption') function signSPKAC($signatureAlgorithm = 'sha1WithRSAEncryption')
{ {
@ -3497,9 +3497,9 @@ class X509
* *
* @param \phpseclib\File\X509 $issuer * @param \phpseclib\File\X509 $issuer
* @param \phpseclib\File\X509 $crl * @param \phpseclib\File\X509 $crl
* @param String $signatureAlgorithm optional * @param string $signatureAlgorithm optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function signCRL($issuer, $crl, $signatureAlgorithm = 'sha1WithRSAEncryption') function signCRL($issuer, $crl, $signatureAlgorithm = 'sha1WithRSAEncryption')
{ {
@ -3624,11 +3624,11 @@ class X509
/** /**
* X.509 certificate signing helper function. * X.509 certificate signing helper function.
* *
* @param Object $key * @param object $key
* @param \phpseclib\File\X509 $subject * @param \phpseclib\File\X509 $subject
* @param String $signatureAlgorithm * @param string $signatureAlgorithm
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function _sign($key, $signatureAlgorithm) function _sign($key, $signatureAlgorithm)
{ {
@ -3655,7 +3655,7 @@ class X509
/** /**
* Set certificate start date * Set certificate start date
* *
* @param String $date * @param string $date
* @access public * @access public
*/ */
function setStartDate($date) function setStartDate($date)
@ -3666,7 +3666,7 @@ class X509
/** /**
* Set certificate end date * Set certificate end date
* *
* @param String $date * @param string $date
* @access public * @access public
*/ */
function setEndDate($date) function setEndDate($date)
@ -3691,7 +3691,7 @@ class X509
/** /**
* Set Serial Number * Set Serial Number
* *
* @param String $serial * @param string $serial
* @param $base optional * @param $base optional
* @access public * @access public
*/ */
@ -3714,8 +3714,8 @@ class X509
* Get a reference to a subarray * Get a reference to a subarray
* *
* @param array $root * @param array $root
* @param String $path absolute path with / as component separator * @param string $path absolute path with / as component separator
* @param Boolean $create optional * @param bool $create optional
* @access private * @access private
* @return array item ref or false * @return array item ref or false
*/ */
@ -3750,8 +3750,8 @@ class X509
* Get a reference to an extension subarray * Get a reference to an extension subarray
* *
* @param array $root * @param array $root
* @param String $path optional absolute path with / as component separator * @param string $path optional absolute path with / as component separator
* @param Boolean $create optional * @param bool $create optional
* @access private * @access private
* @return array ref or false * @return array ref or false
*/ */
@ -3804,10 +3804,10 @@ class X509
/** /**
* Remove an Extension * Remove an Extension
* *
* @param String $id * @param string $id
* @param String $path optional * @param string $path optional
* @access private * @access private
* @return Boolean * @return bool
*/ */
function _removeExtension($id, $path = null) function _removeExtension($id, $path = null)
{ {
@ -3834,11 +3834,11 @@ class X509
* *
* Returns the extension if it exists and false if not * Returns the extension if it exists and false if not
* *
* @param String $id * @param string $id
* @param Array $cert optional * @param array $cert optional
* @param String $path optional * @param string $path optional
* @access private * @access private
* @return Mixed * @return mixed
*/ */
function _getExtension($id, $cert = null, $path = null) function _getExtension($id, $cert = null, $path = null)
{ {
@ -3861,9 +3861,9 @@ class X509
* Returns a list of all extensions in use * Returns a list of all extensions in use
* *
* @param array $cert optional * @param array $cert optional
* @param String $path optional * @param string $path optional
* @access private * @access private
* @return Array * @return array
*/ */
function _getExtensions($cert = null, $path = null) function _getExtensions($cert = null, $path = null)
{ {
@ -3882,13 +3882,13 @@ class X509
/** /**
* Set an Extension * Set an Extension
* *
* @param String $id * @param string $id
* @param Mixed $value * @param mixed $value
* @param Boolean $critical optional * @param bool $critical optional
* @param Boolean $replace optional * @param bool $replace optional
* @param String $path optional * @param string $path optional
* @access private * @access private
* @return Boolean * @return bool
*/ */
function _setExtension($id, $value, $critical = false, $replace = true, $path = null) function _setExtension($id, $value, $critical = false, $replace = true, $path = null)
{ {
@ -3918,9 +3918,9 @@ class X509
/** /**
* Remove a certificate, CSR or CRL Extension * Remove a certificate, CSR or CRL Extension
* *
* @param String $id * @param string $id
* @access public * @access public
* @return Boolean * @return bool
*/ */
function removeExtension($id) function removeExtension($id)
{ {
@ -3932,10 +3932,10 @@ class X509
* *
* Returns the extension if it exists and false if not * Returns the extension if it exists and false if not
* *
* @param String $id * @param string $id
* @param Array $cert optional * @param array $cert optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getExtension($id, $cert = null) function getExtension($id, $cert = null)
{ {
@ -3947,7 +3947,7 @@ class X509
* *
* @param array $cert optional * @param array $cert optional
* @access public * @access public
* @return Array * @return array
*/ */
function getExtensions($cert = null) function getExtensions($cert = null)
{ {
@ -3957,12 +3957,12 @@ class X509
/** /**
* Set a certificate, CSR or CRL Extension * Set a certificate, CSR or CRL Extension
* *
* @param String $id * @param string $id
* @param Mixed $value * @param mixed $value
* @param Boolean $critical optional * @param bool $critical optional
* @param Boolean $replace optional * @param bool $replace optional
* @access public * @access public
* @return Boolean * @return bool
*/ */
function setExtension($id, $value, $critical = false, $replace = true) function setExtension($id, $value, $critical = false, $replace = true)
{ {
@ -3972,10 +3972,10 @@ class X509
/** /**
* Remove a CSR attribute. * Remove a CSR attribute.
* *
* @param String $id * @param string $id
* @param Integer $disposition optional * @param int $disposition optional
* @access public * @access public
* @return Boolean * @return bool
*/ */
function removeAttribute($id, $disposition = self::ATTR_ALL) function removeAttribute($id, $disposition = self::ATTR_ALL)
{ {
@ -4022,11 +4022,11 @@ class X509
* *
* Returns the attribute if it exists and false if not * Returns the attribute if it exists and false if not
* *
* @param String $id * @param string $id
* @param Integer $disposition optional * @param int $disposition optional
* @param Array $csr optional * @param array $csr optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getAttribute($id, $disposition = self::ATTR_ALL, $csr = null) function getAttribute($id, $disposition = self::ATTR_ALL, $csr = null)
{ {
@ -4066,7 +4066,7 @@ class X509
* *
* @param array $csr optional * @param array $csr optional
* @access public * @access public
* @return Array * @return array
*/ */
function getAttributes($csr = null) function getAttributes($csr = null)
{ {
@ -4089,11 +4089,11 @@ class X509
/** /**
* Set a CSR attribute * Set a CSR attribute
* *
* @param String $id * @param string $id
* @param Mixed $value * @param mixed $value
* @param Boolean $disposition optional * @param bool $disposition optional
* @access public * @access public
* @return Boolean * @return bool
*/ */
function setAttribute($id, $value, $disposition = self::ATTR_ALL) function setAttribute($id, $value, $disposition = self::ATTR_ALL)
{ {
@ -4147,7 +4147,7 @@ class X509
* *
* This is used by the id-ce-authorityKeyIdentifier and the id-ce-subjectKeyIdentifier extensions. * This is used by the id-ce-authorityKeyIdentifier and the id-ce-subjectKeyIdentifier extensions.
* *
* @param String $value * @param string $value
* @access public * @access public
*/ */
function setKeyIdentifier($value) function setKeyIdentifier($value)
@ -4172,10 +4172,10 @@ class X509
* - \phpseclib\File\ASN1\Element object * - \phpseclib\File\ASN1\Element object
* - PEM or DER string * - PEM or DER string
* *
* @param Mixed $key optional * @param mixed $key optional
* @param Integer $method optional * @param int $method optional
* @access public * @access public
* @return String binary key identifier * @return string binary key identifier
*/ */
function computeKeyIdentifier($key = null, $method = 1) function computeKeyIdentifier($key = null, $method = 1)
{ {
@ -4249,7 +4249,7 @@ class X509
* Format a public key as appropriate * Format a public key as appropriate
* *
* @access private * @access private
* @return Array * @return array
*/ */
function _formatSubjectPublicKey() function _formatSubjectPublicKey()
{ {
@ -4270,7 +4270,7 @@ class X509
* Set the domain name's which the cert is to be valid for * Set the domain name's which the cert is to be valid for
* *
* @access public * @access public
* @return Array * @return array
*/ */
function setDomain() function setDomain()
{ {
@ -4283,7 +4283,7 @@ class X509
* Set the IP Addresses's which the cert is to be valid for * Set the IP Addresses's which the cert is to be valid for
* *
* @access public * @access public
* @param String $ipAddress optional * @param string $ipAddress optional
*/ */
function setIPAddress() function setIPAddress()
{ {
@ -4300,8 +4300,8 @@ class X509
* Helper function to build domain array * Helper function to build domain array
* *
* @access private * @access private
* @param String $domain * @param string $domain
* @return Array * @return array
*/ */
function _dnsName($domain) function _dnsName($domain)
{ {
@ -4314,8 +4314,8 @@ class X509
* (IPv6 is not currently supported) * (IPv6 is not currently supported)
* *
* @access private * @access private
* @param String $address * @param string $address
* @return Array * @return array
*/ */
function _iPAddress($address) function _iPAddress($address)
{ {
@ -4326,10 +4326,10 @@ class X509
* Get the index of a revoked certificate. * Get the index of a revoked certificate.
* *
* @param array $rclist * @param array $rclist
* @param String $serial * @param string $serial
* @param Boolean $create optional * @param bool $create optional
* @access private * @access private
* @return Integer or false * @return int or false
*/ */
function _revokedCertificate(&$rclist, $serial, $create = false) function _revokedCertificate(&$rclist, $serial, $create = false)
{ {
@ -4354,10 +4354,10 @@ class X509
/** /**
* Revoke a certificate. * Revoke a certificate.
* *
* @param String $serial * @param string $serial
* @param String $date optional * @param string $date optional
* @access public * @access public
* @return Boolean * @return bool
*/ */
function revoke($serial, $date = null) function revoke($serial, $date = null)
{ {
@ -4381,9 +4381,9 @@ class X509
/** /**
* Unrevoke a certificate. * Unrevoke a certificate.
* *
* @param String $serial * @param string $serial
* @access public * @access public
* @return Boolean * @return bool
*/ */
function unrevoke($serial) function unrevoke($serial)
{ {
@ -4401,9 +4401,9 @@ class X509
/** /**
* Get a revoked certificate. * Get a revoked certificate.
* *
* @param String $serial * @param string $serial
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getRevoked($serial) function getRevoked($serial)
{ {
@ -4447,10 +4447,10 @@ class X509
/** /**
* Remove a Revoked Certificate Extension * Remove a Revoked Certificate Extension
* *
* @param String $serial * @param string $serial
* @param String $id * @param string $id
* @access public * @access public
* @return Boolean * @return bool
*/ */
function removeRevokedCertificateExtension($serial, $id) function removeRevokedCertificateExtension($serial, $id)
{ {
@ -4468,11 +4468,11 @@ class X509
* *
* Returns the extension if it exists and false if not * Returns the extension if it exists and false if not
* *
* @param String $serial * @param string $serial
* @param String $id * @param string $id
* @param Array $crl optional * @param array $crl optional
* @access public * @access public
* @return Mixed * @return mixed
*/ */
function getRevokedCertificateExtension($serial, $id, $crl = null) function getRevokedCertificateExtension($serial, $id, $crl = null)
{ {
@ -4492,10 +4492,10 @@ class X509
/** /**
* Returns a list of all extensions in use for a given revoked certificate * Returns a list of all extensions in use for a given revoked certificate
* *
* @param String $serial * @param string $serial
* @param array $crl optional * @param array $crl optional
* @access public * @access public
* @return Array * @return array
*/ */
function getRevokedCertificateExtensions($serial, $crl = null) function getRevokedCertificateExtensions($serial, $crl = null)
{ {
@ -4515,13 +4515,13 @@ class X509
/** /**
* Set a Revoked Certificate Extension * Set a Revoked Certificate Extension
* *
* @param String $serial * @param string $serial
* @param String $id * @param string $id
* @param Mixed $value * @param mixed $value
* @param Boolean $critical optional * @param bool $critical optional
* @param Boolean $replace optional * @param bool $replace optional
* @access public * @access public
* @return Boolean * @return bool
*/ */
function setRevokedCertificateExtension($serial, $id, $value, $critical = false, $replace = true) function setRevokedCertificateExtension($serial, $id, $value, $critical = false, $replace = true)
{ {
@ -4540,8 +4540,8 @@ class X509
* Extract raw BER from Base64 encoding * Extract raw BER from Base64 encoding
* *
* @access private * @access private
* @param String $str * @param string $str
* @return String * @return string
*/ */
function _extractBER($str) function _extractBER($str)
{ {

View File

@ -186,7 +186,7 @@ class BigInteger
/** /**
* Holds the BigInteger's value. * Holds the BigInteger's value.
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $value; var $value;
@ -194,7 +194,7 @@ class BigInteger
/** /**
* Holds the BigInteger's magnitude. * Holds the BigInteger's magnitude.
* *
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $is_negative = false; var $is_negative = false;
@ -231,7 +231,7 @@ class BigInteger
* *
* @see __sleep() * @see __sleep()
* @see __wakeup() * @see __wakeup()
* @var String * @var string
* @access private * @access private
*/ */
var $hex; var $hex;
@ -251,8 +251,8 @@ class BigInteger
* ?> * ?>
* </code> * </code>
* *
* @param optional $x base-10 number or base-$base number if $base set. * @param $x base-10 number or base-$base number if $base set.
* @param optional integer $base * @param int $base
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access public * @access public
*/ */
@ -522,8 +522,8 @@ class BigInteger
* ?> * ?>
* </code> * </code>
* *
* @param Boolean $twos_compliment * @param bool $twos_compliment
* @return String * @return string
* @access public * @access public
* @internal Converts a base-2**26 number to base-2**8 * @internal Converts a base-2**26 number to base-2**8
*/ */
@ -617,8 +617,8 @@ class BigInteger
* ?> * ?>
* </code> * </code>
* *
* @param Boolean $twos_compliment * @param bool $twos_compliment
* @return String * @return string
* @access public * @access public
* @internal Converts a base-2**26 number to base-2**8 * @internal Converts a base-2**26 number to base-2**8
*/ */
@ -642,8 +642,8 @@ class BigInteger
* ?> * ?>
* </code> * </code>
* *
* @param Boolean $twos_compliment * @param bool $twos_compliment
* @return String * @return string
* @access public * @access public
* @internal Converts a base-2**26 number to base-2**2 * @internal Converts a base-2**26 number to base-2**2
*/ */
@ -678,7 +678,7 @@ class BigInteger
* ?> * ?>
* </code> * </code>
* *
* @return String * @return string
* @access public * @access public
* @internal Converts a base-2**26 number to base-10**7 (which is pretty much base-10) * @internal Converts a base-2**26 number to base-10**7 (which is pretty much base-10)
*/ */
@ -863,11 +863,11 @@ class BigInteger
/** /**
* Performs addition. * Performs addition.
* *
* @param Array $x_value * @param array $x_value
* @param Boolean $x_negative * @param bool $x_negative
* @param Array $y_value * @param array $y_value
* @param Boolean $y_negative * @param bool $y_negative
* @return Array * @return array
* @access private * @access private
*/ */
function _add($x_value, $x_negative, $y_value, $y_negative) function _add($x_value, $x_negative, $y_value, $y_negative)
@ -992,11 +992,11 @@ class BigInteger
/** /**
* Performs subtraction. * Performs subtraction.
* *
* @param Array $x_value * @param array $x_value
* @param Boolean $x_negative * @param bool $x_negative
* @param Array $y_value * @param array $y_value
* @param Boolean $y_negative * @param bool $y_negative
* @return Array * @return array
* @access private * @access private
*/ */
function _subtract($x_value, $x_negative, $y_value, $y_negative) function _subtract($x_value, $x_negative, $y_value, $y_negative)
@ -1125,11 +1125,11 @@ class BigInteger
/** /**
* Performs multiplication. * Performs multiplication.
* *
* @param Array $x_value * @param array $x_value
* @param Boolean $x_negative * @param bool $x_negative
* @param Array $y_value * @param array $y_value
* @param Boolean $y_negative * @param bool $y_negative
* @return Array * @return array
* @access private * @access private
*/ */
function _multiply($x_value, $x_negative, $y_value, $y_negative) function _multiply($x_value, $x_negative, $y_value, $y_negative)
@ -1164,9 +1164,9 @@ class BigInteger
* *
* Modeled after 'multiply' in MutableBigInteger.java. * Modeled after 'multiply' in MutableBigInteger.java.
* *
* @param Array $x_value * @param array $x_value
* @param Array $y_value * @param array $y_value
* @return Array * @return array
* @access private * @access private
*/ */
function _regularMultiply($x_value, $y_value) function _regularMultiply($x_value, $y_value)
@ -1228,9 +1228,9 @@ class BigInteger
* See {@link http://en.wikipedia.org/wiki/Karatsuba_algorithm Karatsuba algorithm} and * See {@link http://en.wikipedia.org/wiki/Karatsuba_algorithm Karatsuba algorithm} and
* {@link http://math.libtomcrypt.com/files/tommath.pdf#page=120 MPM 5.2.3}. * {@link http://math.libtomcrypt.com/files/tommath.pdf#page=120 MPM 5.2.3}.
* *
* @param Array $x_value * @param array $x_value
* @param Array $y_value * @param array $y_value
* @return Array * @return array
* @access private * @access private
*/ */
function _karatsuba($x_value, $y_value) function _karatsuba($x_value, $y_value)
@ -1267,8 +1267,8 @@ class BigInteger
/** /**
* Performs squaring * Performs squaring
* *
* @param Array $x * @param array $x
* @return Array * @return array
* @access private * @access private
*/ */
function _square($x = false) function _square($x = false)
@ -1285,8 +1285,8 @@ class BigInteger
* {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=7 HAC 14.2.4} / * {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=7 HAC 14.2.4} /
* {@link http://math.libtomcrypt.com/files/tommath.pdf#page=141 MPM 5.3} for more information. * {@link http://math.libtomcrypt.com/files/tommath.pdf#page=141 MPM 5.3} for more information.
* *
* @param Array $value * @param array $value
* @return Array * @return array
* @access private * @access private
*/ */
function _baseSquare($value) function _baseSquare($value)
@ -1324,8 +1324,8 @@ class BigInteger
* See {@link http://en.wikipedia.org/wiki/Karatsuba_algorithm Karatsuba algorithm} and * See {@link http://en.wikipedia.org/wiki/Karatsuba_algorithm Karatsuba algorithm} and
* {@link http://math.libtomcrypt.com/files/tommath.pdf#page=151 MPM 5.3.4}. * {@link http://math.libtomcrypt.com/files/tommath.pdf#page=151 MPM 5.3.4}.
* *
* @param Array $value * @param array $value
* @return Array * @return array
* @access private * @access private
*/ */
function _karatsubaSquare($value) function _karatsubaSquare($value)
@ -1379,7 +1379,7 @@ class BigInteger
* </code> * </code>
* *
* @param \phpseclib\Math\BigInteger $y * @param \phpseclib\Math\BigInteger $y
* @return Array * @return array
* @access public * @access public
* @internal This function is based off of {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=9 HAC 14.20}. * @internal This function is based off of {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=9 HAC 14.20}.
*/ */
@ -1559,9 +1559,9 @@ class BigInteger
* *
* abc / x = a00 / x + b0 / x + c / x * abc / x = a00 / x + b0 / x + c / x
* *
* @param Array $dividend * @param array $dividend
* @param Array $divisor * @param array $divisor
* @return Array * @return array
* @access private * @access private
*/ */
function _divide_digit($dividend, $divisor) function _divide_digit($dividend, $divisor)
@ -1784,7 +1784,7 @@ class BigInteger
* *
* @param \phpseclib\Math\BigInteger $e * @param \phpseclib\Math\BigInteger $e
* @param \phpseclib\Math\BigInteger $n * @param \phpseclib\Math\BigInteger $n
* @param Integer $mode * @param int $mode
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access private * @access private
*/ */
@ -1859,10 +1859,10 @@ class BigInteger
* *
* @see _slidingWindow() * @see _slidingWindow()
* @access private * @access private
* @param Array $x * @param array $x
* @param Array $n * @param array $n
* @param Integer $mode * @param int $mode
* @return Array * @return array
*/ */
function _reduce($x, $n, $mode) function _reduce($x, $n, $mode)
{ {
@ -1896,10 +1896,10 @@ class BigInteger
* *
* @see _slidingWindow() * @see _slidingWindow()
* @access private * @access private
* @param Array $x * @param array $x
* @param Array $n * @param array $n
* @param Integer $mode * @param int $mode
* @return Array * @return array
*/ */
function _prepareReduce($x, $n, $mode) function _prepareReduce($x, $n, $mode)
{ {
@ -1914,11 +1914,11 @@ class BigInteger
* *
* @see _slidingWindow() * @see _slidingWindow()
* @access private * @access private
* @param Array $x * @param array $x
* @param Array $y * @param array $y
* @param Array $n * @param array $n
* @param Integer $mode * @param int $mode
* @return Array * @return array
*/ */
function _multiplyReduce($x, $y, $n, $mode) function _multiplyReduce($x, $y, $n, $mode)
{ {
@ -1934,10 +1934,10 @@ class BigInteger
* *
* @see _slidingWindow() * @see _slidingWindow()
* @access private * @access private
* @param Array $x * @param array $x
* @param Array $n * @param array $n
* @param Integer $mode * @param int $mode
* @return Array * @return array
*/ */
function _squareReduce($x, $n, $mode) function _squareReduce($x, $n, $mode)
{ {
@ -1985,9 +1985,9 @@ class BigInteger
* *
* @see _slidingWindow() * @see _slidingWindow()
* @access private * @access private
* @param Array $n * @param array $n
* @param Array $m * @param array $m
* @return Array * @return array
*/ */
function _barrett($n, $m) function _barrett($n, $m)
{ {
@ -2082,9 +2082,9 @@ class BigInteger
* *
* @see _slidingWindow() * @see _slidingWindow()
* @access private * @access private
* @param Array $x * @param array $x
* @param Array $n * @param array $n
* @return Array * @return array
*/ */
function _regularBarrett($x, $n) function _regularBarrett($x, $n)
{ {
@ -2152,12 +2152,12 @@ 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 _regularBarrett()
* @param Array $x_value * @param array $x_value
* @param Boolean $x_negative * @param bool $x_negative
* @param Array $y_value * @param array $y_value
* @param Boolean $y_negative * @param bool $y_negative
* @param Integer $stop * @param int $stop
* @return Array * @return array
* @access private * @access private
*/ */
function _multiplyLower($x_value, $x_negative, $y_value, $y_negative, $stop) function _multiplyLower($x_value, $x_negative, $y_value, $y_negative, $stop)
@ -2235,9 +2235,9 @@ class BigInteger
* @see _prepMontgomery() * @see _prepMontgomery()
* @see _slidingWindow() * @see _slidingWindow()
* @access private * @access private
* @param Array $x * @param array $x
* @param Array $n * @param array $n
* @return Array * @return array
*/ */
function _montgomery($x, $n) function _montgomery($x, $n)
{ {
@ -2282,10 +2282,10 @@ class BigInteger
* @see _prepMontgomery() * @see _prepMontgomery()
* @see _montgomery() * @see _montgomery()
* @access private * @access private
* @param Array $x * @param array $x
* @param Array $y * @param array $y
* @param Array $m * @param array $m
* @return Array * @return array
*/ */
function _montgomeryMultiply($x, $y, $m) function _montgomeryMultiply($x, $y, $m)
{ {
@ -2334,9 +2334,9 @@ class BigInteger
* @see _montgomery() * @see _montgomery()
* @see _slidingWindow() * @see _slidingWindow()
* @access private * @access private
* @param Array $x * @param array $x
* @param Array $n * @param array $n
* @return Array * @return array
*/ */
function _prepMontgomery($x, $n) function _prepMontgomery($x, $n)
{ {
@ -2372,8 +2372,8 @@ class BigInteger
* *
* @see _montgomery() * @see _montgomery()
* @access private * @access private
* @param Array $x * @param array $x
* @return Integer * @return int
*/ */
function _modInverse67108864($x) // 2**26 == 67,108,864 function _modInverse67108864($x) // 2**26 == 67,108,864
{ {
@ -2649,7 +2649,7 @@ class BigInteger
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y). * Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
* *
* @param \phpseclib\Math\BigInteger $y * @param \phpseclib\Math\BigInteger $y
* @return Integer < 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 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.
@ -2669,11 +2669,11 @@ class BigInteger
/** /**
* Compares two numbers. * Compares two numbers.
* *
* @param Array $x_value * @param array $x_value
* @param Boolean $x_negative * @param bool $x_negative
* @param Array $y_value * @param array $y_value
* @param Boolean $y_negative * @param bool $y_negative
* @return Integer * @return int
* @see compare() * @see compare()
* @access private * @access private
*/ */
@ -2708,7 +2708,7 @@ class BigInteger
* If you need to see if one number is greater than or less than another number, use BigInteger::compare() * If you need to see if one number is greater than or less than another number, use BigInteger::compare()
* *
* @param \phpseclib\Math\BigInteger $x * @param \phpseclib\Math\BigInteger $x
* @return Boolean * @return bool
* @access public * @access public
* @see compare() * @see compare()
*/ */
@ -2728,7 +2728,7 @@ class BigInteger
* Some bitwise operations give different results depending on the precision being used. Examples include left * Some bitwise operations give different results depending on the precision being used. Examples include left
* shift, not, and rotates. * shift, not, and rotates.
* *
* @param Integer $bits * @param int $bits
* @access public * @access public
*/ */
function setPrecision($bits) function setPrecision($bits)
@ -2906,7 +2906,7 @@ class BigInteger
* *
* Shifts BigInteger's by $shift bits, effectively dividing by 2**$shift. * Shifts BigInteger's by $shift bits, effectively dividing by 2**$shift.
* *
* @param Integer $shift * @param int $shift
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access public * @access public
* @internal The only version that yields any speed increases is the internal version. * @internal The only version that yields any speed increases is the internal version.
@ -2944,7 +2944,7 @@ class BigInteger
* *
* Shifts BigInteger's by $shift bits, effectively multiplying by 2**$shift. * Shifts BigInteger's by $shift bits, effectively multiplying by 2**$shift.
* *
* @param Integer $shift * @param int $shift
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access public * @access public
* @internal The only version that yields any speed increases is the internal version. * @internal The only version that yields any speed increases is the internal version.
@ -2982,7 +2982,7 @@ class BigInteger
* *
* Instead of the top x bits being dropped they're appended to the shifted bit string. * Instead of the top x bits being dropped they're appended to the shifted bit string.
* *
* @param Integer $shift * @param int $shift
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access public * @access public
*/ */
@ -3027,7 +3027,7 @@ class BigInteger
* *
* Instead of the bottom x bits being dropped they're prepended to the shifted bit string. * Instead of the bottom x bits being dropped they're prepended to the shifted bit string.
* *
* @param Integer $shift * @param int $shift
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access public * @access public
*/ */
@ -3041,7 +3041,7 @@ class BigInteger
* *
* Byte length is equal to $length. Uses \phpseclib\Crypt\Random if it's loaded and mt_rand if it's not. * Byte length is equal to $length. Uses \phpseclib\Crypt\Random if it's loaded and mt_rand if it's not.
* *
* @param Integer $length * @param int $length
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access private * @access private
*/ */
@ -3076,7 +3076,7 @@ class BigInteger
* $max->random($min) * $max->random($min)
* *
* @param \phpseclib\Math\BigInteger $arg1 * @param \phpseclib\Math\BigInteger $arg1
* @param optional \phpseclib\Math\BigInteger $arg2 * @param \phpseclib\Math\BigInteger $arg2
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access public * @access public
* @internal The API for creating random numbers used to be $a->random($min, $max), where $a was a BigInteger object. * @internal The API for creating random numbers used to be $a->random($min, $max), where $a was a BigInteger object.
@ -3157,9 +3157,9 @@ class BigInteger
* give up and return false. * give up and return false.
* *
* @param \phpseclib\Math\BigInteger $arg1 * @param \phpseclib\Math\BigInteger $arg1
* @param optional \phpseclib\Math\BigInteger $arg2 * @param \phpseclib\Math\BigInteger $arg2
* @param optional Integer $timeout * @param int $timeout
* @return Mixed * @return mixed
* @access public * @access public
* @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap4.pdf#page=15 HAC 4.44}. * @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap4.pdf#page=15 HAC 4.44}.
*/ */
@ -3286,8 +3286,8 @@ class BigInteger
* $t parameter is distributability. BigInteger::randomPrime() can be distributed across multiple pageloads * $t parameter is distributability. BigInteger::randomPrime() can be distributed across multiple pageloads
* on a website instead of just one. * on a website instead of just one.
* *
* @param optional \phpseclib\Math\BigInteger $t * @param \phpseclib\Math\BigInteger $t
* @return Boolean * @return bool
* @access public * @access public
* @internal Uses the * @internal Uses the
* {@link http://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test Miller-Rabin primality test}. See * {@link http://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test Miller-Rabin primality test}. See
@ -3439,7 +3439,7 @@ class BigInteger
* *
* Shifts BigInteger's by $shift bits. * Shifts BigInteger's by $shift bits.
* *
* @param Integer $shift * @param int $shift
* @access private * @access private
*/ */
function _lshift($shift) function _lshift($shift)
@ -3474,7 +3474,7 @@ class BigInteger
* *
* Shifts BigInteger's by $shift bits. * Shifts BigInteger's by $shift bits.
* *
* @param Integer $shift * @param int $shift
* @access private * @access private
*/ */
function _rshift($shift) function _rshift($shift)
@ -3558,7 +3558,7 @@ class BigInteger
* *
* Removes leading zeros * Removes leading zeros
* *
* @param Array $value * @param array $value
* @return \phpseclib\Math\BigInteger * @return \phpseclib\Math\BigInteger
* @access private * @access private
*/ */
@ -3579,7 +3579,7 @@ class BigInteger
* *
* @param $input Array * @param $input Array
* @param $multiplier mixed * @param $multiplier mixed
* @return Array * @return array
* @access private * @access private
*/ */
function _array_repeat($input, $multiplier) function _array_repeat($input, $multiplier)
@ -3594,7 +3594,7 @@ class BigInteger
* *
* @param $x String * @param $x String
* @param $shift Integer * @param $shift Integer
* @return String * @return string
* @access private * @access private
*/ */
function _base256_lshift(&$x, $shift) function _base256_lshift(&$x, $shift)
@ -3623,7 +3623,7 @@ class BigInteger
* *
* @param $x String * @param $x String
* @param $shift Integer * @param $shift Integer
* @return String * @return string
* @access private * @access private
*/ */
function _base256_rshift(&$x, $shift) function _base256_rshift(&$x, $shift)
@ -3663,8 +3663,8 @@ class BigInteger
/** /**
* Converts 32-bit integers to bytes. * Converts 32-bit integers to bytes.
* *
* @param Integer $x * @param int $x
* @return String * @return string
* @access private * @access private
*/ */
function _int2bytes($x) function _int2bytes($x)
@ -3675,8 +3675,8 @@ class BigInteger
/** /**
* Converts bytes to 32-bit integers * Converts bytes to 32-bit integers
* *
* @param String $x * @param string $x
* @return Integer * @return int
* @access private * @access private
*/ */
function _bytes2int($x) function _bytes2int($x)
@ -3692,8 +3692,8 @@ class BigInteger
* *
* @see modPow() * @see modPow()
* @access private * @access private
* @param Integer $length * @param int $length
* @return String * @return string
*/ */
function _encodeASN1Length($length) function _encodeASN1Length($length)
{ {
@ -3714,9 +3714,9 @@ class BigInteger
* we'll guarantee that the dividend is divisible by first subtracting the remainder. * we'll guarantee that the dividend is divisible by first subtracting the remainder.
* *
* @access private * @access private
* @param Integer $x * @param int $x
* @param Integer $y * @param int $y
* @return Integer * @return int
*/ */
function _safe_divide($x, $y) function _safe_divide($x, $y)
{ {

View File

@ -76,7 +76,7 @@ class SCP
/** /**
* SSH Object * SSH Object
* *
* @var Object * @var object
* @access private * @access private
*/ */
var $ssh; var $ssh;
@ -84,7 +84,7 @@ class SCP
/** /**
* Packet Size * Packet Size
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $packet_size; var $packet_size;
@ -92,7 +92,7 @@ class SCP
/** /**
* Mode * Mode
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $mode; var $mode;
@ -102,9 +102,9 @@ class SCP
* *
* Connects to an SSH server * Connects to an SSH server
* *
* @param String $host * @param string $host
* @param optional Integer $port * @param int $port
* @param optional Integer $timeout * @param int $timeout
* @return \phpseclib\Net\SCP * @return \phpseclib\Net\SCP
* @access public * @access public
*/ */
@ -136,11 +136,11 @@ class SCP
* Currently, only binary mode is supported. As such, if the line endings need to be adjusted, you will need to take * Currently, only binary mode is supported. As such, if the line endings need to be adjusted, you will need to take
* care of that, yourself. * care of that, yourself.
* *
* @param String $remote_file * @param string $remote_file
* @param String $data * @param string $data
* @param optional Integer $mode * @param int $mode
* @param optional Callable $callback * @param callable $callback
* @return Boolean * @return bool
* @access public * @access public
*/ */
function put($remote_file, $data, $mode = self::SOURCE_STRING, $callback = null) function put($remote_file, $data, $mode = self::SOURCE_STRING, $callback = null)
@ -212,9 +212,9 @@ class SCP
* the operation was unsuccessful. If $local_file is defined, returns true or false depending on the success of the * the operation was unsuccessful. If $local_file is defined, returns true or false depending on the success of the
* operation * operation
* *
* @param String $remote_file * @param string $remote_file
* @param optional String $local_file * @param string $local_file
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function get($remote_file, $local_file = false) function get($remote_file, $local_file = false)
@ -270,7 +270,7 @@ class SCP
/** /**
* Sends a packet to an SSH server * Sends a packet to an SSH server
* *
* @param String $data * @param string $data
* @access private * @access private
*/ */
function _send($data) function _send($data)
@ -288,7 +288,7 @@ class SCP
/** /**
* Receives a packet from an SSH server * Receives a packet from an SSH server
* *
* @return String * @return string
* @access private * @access private
*/ */
function _receive() function _receive()

View File

@ -91,7 +91,7 @@ class SFTP extends SSH2
* Packet Types * Packet Types
* *
* @see \phpseclib\Net\SFTP::__construct() * @see \phpseclib\Net\SFTP::__construct()
* @var Array * @var array
* @access private * @access private
*/ */
var $packet_types = array(); var $packet_types = array();
@ -100,7 +100,7 @@ class SFTP extends SSH2
* Status Codes * Status Codes
* *
* @see \phpseclib\Net\SFTP::__construct() * @see \phpseclib\Net\SFTP::__construct()
* @var Array * @var array
* @access private * @access private
*/ */
var $status_codes = array(); var $status_codes = array();
@ -111,7 +111,7 @@ class SFTP extends SSH2
* The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support * The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support
* concurrent actions, so it's somewhat academic, here. * concurrent actions, so it's somewhat academic, here.
* *
* @var Integer * @var int
* @see \phpseclib\Net\SFTP::_send_sftp_packet() * @see \phpseclib\Net\SFTP::_send_sftp_packet()
* @access private * @access private
*/ */
@ -123,7 +123,7 @@ class SFTP extends SSH2
* The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support * The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support
* concurrent actions, so it's somewhat academic, here. * concurrent actions, so it's somewhat academic, here.
* *
* @var Integer * @var int
* @see \phpseclib\Net\SFTP::_get_sftp_packet() * @see \phpseclib\Net\SFTP::_get_sftp_packet()
* @access private * @access private
*/ */
@ -132,7 +132,7 @@ class SFTP extends SSH2
/** /**
* Packet Buffer * Packet Buffer
* *
* @var String * @var string
* @see \phpseclib\Net\SFTP::_get_sftp_packet() * @see \phpseclib\Net\SFTP::_get_sftp_packet()
* @access private * @access private
*/ */
@ -141,7 +141,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 \phpseclib\Net\SFTP::_initChannel()
* @access private * @access private
*/ */
@ -150,7 +150,7 @@ class SFTP extends SSH2
/** /**
* Server SFTP version * Server SFTP version
* *
* @var Integer * @var int
* @see \phpseclib\Net\SFTP::_initChannel() * @see \phpseclib\Net\SFTP::_initChannel()
* @access private * @access private
*/ */
@ -159,7 +159,7 @@ class SFTP extends SSH2
/** /**
* Current working directory * Current working directory
* *
* @var String * @var string
* @see \phpseclib\Net\SFTP::_realpath() * @see \phpseclib\Net\SFTP::_realpath()
* @see \phpseclib\Net\SFTP::chdir() * @see \phpseclib\Net\SFTP::chdir()
* @access private * @access private
@ -170,7 +170,7 @@ class SFTP extends SSH2
* Packet Type Log * Packet Type Log
* *
* @see \phpseclib\Net\SFTP::getLog() * @see \phpseclib\Net\SFTP::getLog()
* @var Array * @var array
* @access private * @access private
*/ */
var $packet_type_log = array(); var $packet_type_log = array();
@ -179,7 +179,7 @@ class SFTP extends SSH2
* Packet Log * Packet Log
* *
* @see \phpseclib\Net\SFTP::getLog() * @see \phpseclib\Net\SFTP::getLog()
* @var Array * @var array
* @access private * @access private
*/ */
var $packet_log = array(); var $packet_log = array();
@ -189,7 +189,7 @@ class SFTP extends SSH2
* *
* @see \phpseclib\Net\SFTP::getSFTPErrors() * @see \phpseclib\Net\SFTP::getSFTPErrors()
* @see \phpseclib\Net\SFTP::getLastSFTPError() * @see \phpseclib\Net\SFTP::getLastSFTPError()
* @var String * @var string
* @access private * @access private
*/ */
var $sftp_errors = array(); var $sftp_errors = array();
@ -203,7 +203,7 @@ class SFTP extends SSH2
* @see \phpseclib\Net\SFTP::_update_stat_cache() * @see \phpseclib\Net\SFTP::_update_stat_cache()
* @see \phpseclib\Net\SFTP::_remove_from_stat_cache() * @see \phpseclib\Net\SFTP::_remove_from_stat_cache()
* @see \phpseclib\Net\SFTP::_query_stat_cache() * @see \phpseclib\Net\SFTP::_query_stat_cache()
* @var Array * @var array
* @access private * @access private
*/ */
var $stat_cache = array(); var $stat_cache = array();
@ -213,7 +213,7 @@ class SFTP extends SSH2
* *
* @see \phpseclib\Net\SFTP::__construct() * @see \phpseclib\Net\SFTP::__construct()
* @see \phpseclib\Net\SFTP::get() * @see \phpseclib\Net\SFTP::get()
* @var Array * @var array
* @access private * @access private
*/ */
var $max_sftp_packet; var $max_sftp_packet;
@ -223,7 +223,7 @@ class SFTP extends SSH2
* *
* @see \phpseclib\Net\SFTP::disableStatCache() * @see \phpseclib\Net\SFTP::disableStatCache()
* @see \phpseclib\Net\SFTP::enableStatCache() * @see \phpseclib\Net\SFTP::enableStatCache()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $use_stat_cache = true; var $use_stat_cache = true;
@ -233,7 +233,7 @@ class SFTP extends SSH2
* *
* @see \phpseclib\Net\SFTP::_comparator() * @see \phpseclib\Net\SFTP::_comparator()
* @see \phpseclib\Net\SFTP::setListOrder() * @see \phpseclib\Net\SFTP::setListOrder()
* @var Array * @var array
* @access private * @access private
*/ */
var $sortOptions = array(); var $sortOptions = array();
@ -243,9 +243,9 @@ class SFTP extends SSH2
* *
* Connects to an SFTP server * Connects to an SFTP server
* *
* @param String $host * @param string $host
* @param optional Integer $port * @param int $port
* @param optional Integer $timeout * @param int $timeout
* @return \phpseclib\Net\SFTP * @return \phpseclib\Net\SFTP
* @access public * @access public
*/ */
@ -381,9 +381,9 @@ class SFTP extends SSH2
/** /**
* Login * Login
* *
* @param String $username * @param string $username
* @param optional String $password * @param string $password
* @return Boolean * @return bool
* @access public * @access public
*/ */
function login($username) function login($username)
@ -571,7 +571,7 @@ class SFTP extends SSH2
/** /**
* Returns the current directory name * Returns the current directory name
* *
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function pwd() function pwd()
@ -582,8 +582,8 @@ class SFTP extends SSH2
/** /**
* Logs errors * Logs errors
* *
* @param String $response * @param string $response
* @param optional Integer $status * @param int $status
* @access public * @access public
*/ */
function _logError($response, $status = -1) function _logError($response, $status = -1)
@ -609,8 +609,8 @@ class SFTP extends SSH2
* the absolute (canonicalized) path. * the absolute (canonicalized) path.
* *
* @see \phpseclib\Net\SFTP::chdir() * @see \phpseclib\Net\SFTP::chdir()
* @param String $path * @param string $path
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _realpath($path) function _realpath($path)
@ -665,8 +665,8 @@ class SFTP extends SSH2
/** /**
* Changes the current directory * Changes the current directory
* *
* @param String $dir * @param string $dir
* @return Boolean * @return bool
* @access public * @access public
*/ */
function chdir($dir) function chdir($dir)
@ -727,9 +727,9 @@ class SFTP extends SSH2
/** /**
* Returns a list of files in the given directory * Returns a list of files in the given directory
* *
* @param optional String $dir * @param string $dir
* @param optional Boolean $recursive * @param bool $recursive
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function nlist($dir = '.', $recursive = false) function nlist($dir = '.', $recursive = false)
@ -740,10 +740,10 @@ class SFTP extends SSH2
/** /**
* Helper method for nlist * Helper method for nlist
* *
* @param String $dir * @param string $dir
* @param Boolean $recursive * @param bool $recursive
* @param String $relativeDir * @param string $relativeDir
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _nlist_helper($dir, $recursive, $relativeDir) function _nlist_helper($dir, $recursive, $relativeDir)
@ -776,9 +776,9 @@ class SFTP extends SSH2
/** /**
* Returns a detailed list of files in the given directory * Returns a detailed list of files in the given directory
* *
* @param optional String $dir * @param string $dir
* @param optional Boolean $recursive * @param bool $recursive
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function rawlist($dir = '.', $recursive = false) function rawlist($dir = '.', $recursive = false)
@ -810,9 +810,9 @@ class SFTP extends SSH2
/** /**
* Reads a list, be it detailed or not, of files in the given directory * Reads a list, be it detailed or not, of files in the given directory
* *
* @param String $dir * @param string $dir
* @param optional Boolean $raw * @param bool $raw
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _list($dir, $raw = true) function _list($dir, $raw = true)
@ -920,9 +920,9 @@ class SFTP extends SSH2
* *
* Intended for use with uasort() * Intended for use with uasort()
* *
* @param Array $a * @param array $a
* @param Array $b * @param array $b
* @return Integer * @return int
* @access private * @access private
*/ */
function _comparator($a, $b) function _comparator($a, $b)
@ -1020,8 +1020,8 @@ class SFTP extends SSH2
* *
* Files larger than 4GB will show up as being exactly 4GB. * Files larger than 4GB will show up as being exactly 4GB.
* *
* @param String $filename * @param string $filename
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function size($filename) function size($filename)
@ -1040,8 +1040,8 @@ class SFTP extends SSH2
/** /**
* Save files / directories to cache * Save files / directories to cache
* *
* @param String $path * @param string $path
* @param Mixed $value * @param mixed $value
* @access private * @access private
*/ */
function _update_stat_cache($path, $value) function _update_stat_cache($path, $value)
@ -1084,8 +1084,8 @@ class SFTP extends SSH2
/** /**
* Remove files / directories from cache * Remove files / directories from cache
* *
* @param String $path * @param string $path
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _remove_from_stat_cache($path) function _remove_from_stat_cache($path)
@ -1111,8 +1111,8 @@ class SFTP extends SSH2
* *
* Mainly used by file_exists * Mainly used by file_exists
* *
* @param String $dir * @param string $dir
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _query_stat_cache($path) function _query_stat_cache($path)
@ -1134,8 +1134,8 @@ class SFTP extends SSH2
* *
* Returns an array on success and false otherwise. * Returns an array on success and false otherwise.
* *
* @param String $filename * @param string $filename
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function stat($filename) function stat($filename)
@ -1191,8 +1191,8 @@ class SFTP extends SSH2
* *
* Returns an array on success and false otherwise. * Returns an array on success and false otherwise.
* *
* @param String $filename * @param string $filename
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function lstat($filename) function lstat($filename)
@ -1257,9 +1257,9 @@ class SFTP extends SSH2
* Determines information without calling \phpseclib\Net\SFTP::_realpath(). * Determines information without calling \phpseclib\Net\SFTP::_realpath().
* The second parameter can be either NET_SFTP_STAT or NET_SFTP_LSTAT. * The second parameter can be either NET_SFTP_STAT or NET_SFTP_LSTAT.
* *
* @param String $filename * @param string $filename
* @param Integer $type * @param int $type
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _stat($filename, $type) function _stat($filename, $type)
@ -1286,9 +1286,9 @@ class SFTP extends SSH2
/** /**
* Truncates a file to a given length * Truncates a file to a given length
* *
* @param String $filename * @param string $filename
* @param Integer $new_size * @param int $new_size
* @return Boolean * @return bool
* @access public * @access public
*/ */
function truncate($filename, $new_size) function truncate($filename, $new_size)
@ -1303,10 +1303,10 @@ class SFTP extends SSH2
* *
* If the file does not exist, it will be created. * If the file does not exist, it will be created.
* *
* @param String $filename * @param string $filename
* @param optional Integer $time * @param int $time
* @param optional Integer $atime * @param int $atime
* @return Boolean * @return bool
* @access public * @access public
*/ */
function touch($filename, $time = null, $atime = null) function touch($filename, $time = null, $atime = null)
@ -1354,10 +1354,10 @@ class SFTP extends SSH2
* *
* Returns true on success or false on error. * Returns true on success or false on error.
* *
* @param String $filename * @param string $filename
* @param Integer $uid * @param int $uid
* @param optional Boolean $recursive * @param bool $recursive
* @return Boolean * @return bool
* @access public * @access public
*/ */
function chown($filename, $uid, $recursive = false) function chown($filename, $uid, $recursive = false)
@ -1374,10 +1374,10 @@ class SFTP extends SSH2
* *
* Returns true on success or false on error. * Returns true on success or false on error.
* *
* @param String $filename * @param string $filename
* @param Integer $gid * @param int $gid
* @param optional Boolean $recursive * @param bool $recursive
* @return Boolean * @return bool
* @access public * @access public
*/ */
function chgrp($filename, $gid, $recursive = false) function chgrp($filename, $gid, $recursive = false)
@ -1393,10 +1393,10 @@ class SFTP extends SSH2
* Returns the new file permissions on success or false on error. * Returns the new file permissions on success or false on error.
* If $recursive is true than this just returns true or false. * If $recursive is true than this just returns true or false.
* *
* @param Integer $mode * @param int $mode
* @param String $filename * @param string $filename
* @param optional Boolean $recursive * @param bool $recursive
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function chmod($mode, $filename, $recursive = false) function chmod($mode, $filename, $recursive = false)
@ -1440,10 +1440,10 @@ class SFTP extends SSH2
/** /**
* Sets information about a file * Sets information about a file
* *
* @param String $filename * @param string $filename
* @param String $attr * @param string $attr
* @param Boolean $recursive * @param bool $recursive
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _setstat($filename, $attr, $recursive) function _setstat($filename, $attr, $recursive)
@ -1499,10 +1499,10 @@ class SFTP extends SSH2
* *
* Minimizes directory lookups and SSH_FXP_STATUS requests for speed. * Minimizes directory lookups and SSH_FXP_STATUS requests for speed.
* *
* @param String $path * @param string $path
* @param String $attr * @param string $attr
* @param Integer $i * @param int $i
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _setstat_recursive($path, $attr, &$i) function _setstat_recursive($path, $attr, &$i)
@ -1569,8 +1569,8 @@ class SFTP extends SSH2
/** /**
* Return the target of a symbolic link * Return the target of a symbolic link
* *
* @param String $link * @param string $link
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function readlink($link) function readlink($link)
@ -1612,9 +1612,9 @@ class SFTP extends SSH2
* *
* symlink() creates a symbolic link to the existing target with the specified name link. * symlink() creates a symbolic link to the existing target with the specified name link.
* *
* @param String $target * @param string $target
* @param String $link * @param string $link
* @return Boolean * @return bool
* @access public * @access public
*/ */
function symlink($target, $link) function symlink($target, $link)
@ -1649,8 +1649,8 @@ class SFTP extends SSH2
/** /**
* Creates a directory. * Creates a directory.
* *
* @param String $dir * @param string $dir
* @return Boolean * @return bool
* @access public * @access public
*/ */
function mkdir($dir, $mode = -1, $recursive = false) function mkdir($dir, $mode = -1, $recursive = false)
@ -1684,8 +1684,8 @@ class SFTP extends SSH2
/** /**
* Helper function for directory creation * Helper function for directory creation
* *
* @param String $dir * @param string $dir
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _mkdir_helper($dir, $attr) function _mkdir_helper($dir, $attr)
@ -1712,8 +1712,8 @@ class SFTP extends SSH2
/** /**
* Removes a directory. * Removes a directory.
* *
* @param String $dir * @param string $dir
* @return Boolean * @return bool
* @access public * @access public
*/ */
function rmdir($dir) function rmdir($dir)
@ -1788,13 +1788,13 @@ class SFTP extends SSH2
* *
* Setting $local_start to > 0 or $mode | self::RESUME_START doesn't do anything unless $mode | self::SOURCE_LOCAL_FILE. * Setting $local_start to > 0 or $mode | self::RESUME_START doesn't do anything unless $mode | self::SOURCE_LOCAL_FILE.
* *
* @param String $remote_file * @param string $remote_file
* @param String|resource $data * @param string|resource $data
* @param optional Integer $mode * @param int $mode
* @param optional Integer $start * @param int $start
* @param optional Integer $local_start * @param int $local_start
* @param optional callable|null $progressCallback * @param callable|null $progressCallback
* @return Boolean * @return bool
* @access public * @access public
* @internal ASCII mode for SFTPv4/5/6 can be supported by adding a new function - \phpseclib\Net\SFTP::setMode(). * @internal ASCII mode for SFTPv4/5/6 can be supported by adding a new function - \phpseclib\Net\SFTP::setMode().
*/ */
@ -1948,8 +1948,8 @@ class SFTP extends SSH2
* Sending an SSH_FXP_WRITE packet and immediately reading its response isn't as efficient as blindly sending out $i * Sending an SSH_FXP_WRITE packet and immediately reading its response isn't as efficient as blindly sending out $i
* SSH_FXP_WRITEs, in succession, and then reading $i responses. * SSH_FXP_WRITEs, in succession, and then reading $i responses.
* *
* @param Integer $i * @param int $i
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _read_put_responses($i) function _read_put_responses($i)
@ -1974,8 +1974,8 @@ class SFTP extends SSH2
/** /**
* Close handle * Close handle
* *
* @param String $handle * @param string $handle
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _close_handle($handle) function _close_handle($handle)
@ -2010,11 +2010,11 @@ class SFTP extends SSH2
* *
* $offset and $length can be used to download files in chunks. * $offset and $length can be used to download files in chunks.
* *
* @param String $remote_file * @param string $remote_file
* @param optional String $local_file * @param string $local_file
* @param optional Integer $offset * @param int $offset
* @param optional Integer $length * @param int $length
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function get($remote_file, $local_file = false, $offset = 0, $length = -1) function get($remote_file, $local_file = false, $offset = 0, $length = -1)
@ -2126,9 +2126,9 @@ class SFTP extends SSH2
/** /**
* Deletes a file on the SFTP server. * Deletes a file on the SFTP server.
* *
* @param String $path * @param string $path
* @param Boolean $recursive * @param bool $recursive
* @return Boolean * @return bool
* @access public * @access public
*/ */
function delete($path, $recursive = true) function delete($path, $recursive = true)
@ -2176,9 +2176,9 @@ class SFTP extends SSH2
* *
* Minimizes directory lookups and SSH_FXP_STATUS requests for speed. * Minimizes directory lookups and SSH_FXP_STATUS requests for speed.
* *
* @param String $path * @param string $path
* @param Integer $i * @param int $i
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _delete_recursive($path, &$i) function _delete_recursive($path, &$i)
@ -2243,8 +2243,8 @@ class SFTP extends SSH2
/** /**
* Checks whether a file or directory exists * Checks whether a file or directory exists
* *
* @param String $path * @param string $path
* @return Boolean * @return bool
* @access public * @access public
*/ */
function file_exists($path) function file_exists($path)
@ -2266,8 +2266,8 @@ class SFTP extends SSH2
/** /**
* Tells whether the filename is a directory * Tells whether the filename is a directory
* *
* @param String $path * @param string $path
* @return Boolean * @return bool
* @access public * @access public
*/ */
function is_dir($path) function is_dir($path)
@ -2282,8 +2282,8 @@ class SFTP extends SSH2
/** /**
* Tells whether the filename is a regular file * Tells whether the filename is a regular file
* *
* @param String $path * @param string $path
* @return Boolean * @return bool
* @access public * @access public
*/ */
function is_file($path) function is_file($path)
@ -2298,8 +2298,8 @@ class SFTP extends SSH2
/** /**
* Tells whether the filename is a symbolic link * Tells whether the filename is a symbolic link
* *
* @param String $path * @param string $path
* @return Boolean * @return bool
* @access public * @access public
*/ */
function is_link($path) function is_link($path)
@ -2314,8 +2314,8 @@ class SFTP extends SSH2
/** /**
* Gets last access time of file * Gets last access time of file
* *
* @param String $path * @param string $path
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function fileatime($path) function fileatime($path)
@ -2326,8 +2326,8 @@ class SFTP extends SSH2
/** /**
* Gets file modification time * Gets file modification time
* *
* @param String $path * @param string $path
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function filemtime($path) function filemtime($path)
@ -2338,8 +2338,8 @@ class SFTP extends SSH2
/** /**
* Gets file permissions * Gets file permissions
* *
* @param String $path * @param string $path
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function fileperms($path) function fileperms($path)
@ -2350,8 +2350,8 @@ class SFTP extends SSH2
/** /**
* Gets file owner * Gets file owner
* *
* @param String $path * @param string $path
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function fileowner($path) function fileowner($path)
@ -2362,8 +2362,8 @@ class SFTP extends SSH2
/** /**
* Gets file group * Gets file group
* *
* @param String $path * @param string $path
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function filegroup($path) function filegroup($path)
@ -2374,8 +2374,8 @@ class SFTP extends SSH2
/** /**
* Gets file size * Gets file size
* *
* @param String $path * @param string $path
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function filesize($path) function filesize($path)
@ -2386,8 +2386,8 @@ class SFTP extends SSH2
/** /**
* Gets file type * Gets file type
* *
* @param String $path * @param string $path
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function filetype($path) function filetype($path)
@ -2420,9 +2420,9 @@ class SFTP extends SSH2
* *
* Uses cache if appropriate. * Uses cache if appropriate.
* *
* @param String $path * @param string $path
* @param String $prop * @param string $prop
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _get_stat_cache_prop($path, $prop) function _get_stat_cache_prop($path, $prop)
@ -2435,9 +2435,9 @@ class SFTP extends SSH2
* *
* Uses cache if appropriate. * Uses cache if appropriate.
* *
* @param String $path * @param string $path
* @param String $prop * @param string $prop
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _get_lstat_cache_prop($path, $prop) function _get_lstat_cache_prop($path, $prop)
@ -2450,9 +2450,9 @@ class SFTP extends SSH2
* *
* Uses cache if appropriate. * Uses cache if appropriate.
* *
* @param String $path * @param string $path
* @param String $prop * @param string $prop
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _get_xstat_cache_prop($path, $prop, $type) function _get_xstat_cache_prop($path, $prop, $type)
@ -2479,9 +2479,9 @@ class SFTP extends SSH2
/** /**
* Renames a file or a directory on the SFTP server * Renames a file or a directory on the SFTP server
* *
* @param String $oldname * @param string $oldname
* @param String $newname * @param string $newname
* @return Boolean * @return bool
* @access public * @access public
*/ */
function rename($oldname, $newname) function rename($oldname, $newname)
@ -2529,8 +2529,8 @@ class SFTP extends SSH2
* *
* See '7. File Attributes' of draft-ietf-secsh-filexfer-13 for more info. * See '7. File Attributes' of draft-ietf-secsh-filexfer-13 for more info.
* *
* @param String $response * @param string $response
* @return Array * @return array
* @access private * @access private
*/ */
function _parseAttributes(&$response) function _parseAttributes(&$response)
@ -2583,8 +2583,8 @@ class SFTP extends SSH2
* *
* Quoting the SFTP RFC, "Implementations MUST NOT send bits that are not defined" but they seem to anyway * Quoting the SFTP RFC, "Implementations MUST NOT send bits that are not defined" but they seem to anyway
* *
* @param Integer $mode * @param int $mode
* @return Integer * @return int
* @access private * @access private
*/ */
function _parseMode($mode) function _parseMode($mode)
@ -2630,8 +2630,8 @@ class SFTP extends SSH2
* *
* If the longname is in an unrecognized format bool(false) is returned. * If the longname is in an unrecognized format bool(false) is returned.
* *
* @param String $longname * @param string $longname
* @return Mixed * @return mixed
* @access private * @access private
*/ */
function _parseLongname($longname) function _parseLongname($longname)
@ -2659,11 +2659,11 @@ class SFTP extends SSH2
* *
* See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info. * See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info.
* *
* @param Integer $type * @param int $type
* @param String $data * @param string $data
* @see \phpseclib\Net\SFTP::_get_sftp_packet() * @see \phpseclib\Net\SFTP::_get_sftp_packet()
* @see \phpseclib\Net\SSH2::_send_channel_packet() * @see \phpseclib\Net\SSH2::_send_channel_packet()
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _send_sftp_packet($type, $data) function _send_sftp_packet($type, $data)
@ -2704,7 +2704,7 @@ class SFTP extends SSH2
* messages containing one SFTP packet. * messages containing one SFTP packet.
* *
* @see \phpseclib\Net\SFTP::_send_sftp_packet() * @see \phpseclib\Net\SFTP::_send_sftp_packet()
* @return String * @return string
* @access private * @access private
*/ */
function _get_sftp_packet() function _get_sftp_packet()
@ -2776,7 +2776,7 @@ class SFTP extends SSH2
* Returns a string if NET_SFTP_LOGGING == NET_SFTP_LOG_COMPLEX, an array if NET_SFTP_LOGGING == NET_SFTP_LOG_SIMPLE and false if !defined('NET_SFTP_LOGGING') * Returns a string if NET_SFTP_LOGGING == NET_SFTP_LOG_COMPLEX, an array if NET_SFTP_LOGGING == NET_SFTP_LOG_SIMPLE and false if !defined('NET_SFTP_LOGGING')
* *
* @access public * @access public
* @return String or Array * @return string or Array
*/ */
function getSFTPLog() function getSFTPLog()
{ {
@ -2797,7 +2797,7 @@ class SFTP extends SSH2
/** /**
* Returns all errors * Returns all errors
* *
* @return String * @return string
* @access public * @access public
*/ */
function getSFTPErrors() function getSFTPErrors()
@ -2808,7 +2808,7 @@ class SFTP extends SSH2
/** /**
* Returns the last error * Returns the last error
* *
* @return String * @return string
* @access public * @access public
*/ */
function getLastSFTPError() function getLastSFTPError()
@ -2819,7 +2819,7 @@ class SFTP extends SSH2
/** /**
* Get supported SFTP versions * Get supported SFTP versions
* *
* @return Array * @return array
* @access public * @access public
*/ */
function getSupportedVersions() function getSupportedVersions()
@ -2834,8 +2834,8 @@ class SFTP extends SSH2
/** /**
* Disconnect * Disconnect
* *
* @param Integer $reason * @param int $reason
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _disconnect($reason) function _disconnect($reason)

View File

@ -34,14 +34,14 @@ class Stream
* *
* Rather than re-create the connection we re-use instances if possible * Rather than re-create the connection we re-use instances if possible
* *
* @var Array * @var array
*/ */
static $instances; static $instances;
/** /**
* SFTP instance * SFTP instance
* *
* @var Object * @var object
* @access private * @access private
*/ */
var $sftp; var $sftp;
@ -49,7 +49,7 @@ class Stream
/** /**
* Path * Path
* *
* @var String * @var string
* @access private * @access private
*/ */
var $path; var $path;
@ -57,7 +57,7 @@ class Stream
/** /**
* Mode * Mode
* *
* @var String * @var string
* @access private * @access private
*/ */
var $mode; var $mode;
@ -65,7 +65,7 @@ class Stream
/** /**
* Position * Position
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $pos; var $pos;
@ -73,7 +73,7 @@ class Stream
/** /**
* Size * Size
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $size; var $size;
@ -81,7 +81,7 @@ class Stream
/** /**
* Directory entries * Directory entries
* *
* @var Array * @var array
* @access private * @access private
*/ */
var $entries; var $entries;
@ -89,7 +89,7 @@ class Stream
/** /**
* EOF flag * EOF flag
* *
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $eof; var $eof;
@ -99,7 +99,7 @@ class Stream
* *
* Technically this needs to be publically accessible so PHP can set it directly * Technically this needs to be publically accessible so PHP can set it directly
* *
* @var Resource * @var resource
* @access public * @access public
*/ */
var $context; var $context;
@ -107,7 +107,7 @@ class Stream
/** /**
* Notification callback function * Notification callback function
* *
* @var Callable * @var callable
* @access public * @access public
*/ */
var $notification; var $notification;
@ -115,8 +115,8 @@ class Stream
/** /**
* Registers this class as a URL wrapper. * Registers this class as a URL wrapper.
* *
* @param optional String $protocol The wrapper name to be registered. * @param string $protocol The wrapper name to be registered.
* @return Boolean True on success, false otherwise. * @return bool True on success, false otherwise.
* @access public * @access public
*/ */
static function register($protocol = 'sftp') static function register($protocol = 'sftp')
@ -147,8 +147,8 @@ class Stream
* If "notification" is set as a context parameter the message code for successful login is * If "notification" is set as a context parameter the message code for successful login is
* NET_SSH2_MSG_USERAUTH_SUCCESS. For a failed login it's NET_SSH2_MSG_USERAUTH_FAILURE. * NET_SSH2_MSG_USERAUTH_SUCCESS. For a failed login it's NET_SSH2_MSG_USERAUTH_FAILURE.
* *
* @param String $path * @param string $path
* @return String * @return string
* @access private * @access private
*/ */
function _parse_path($path) function _parse_path($path)
@ -239,11 +239,11 @@ class Stream
/** /**
* Opens file or URL * Opens file or URL
* *
* @param String $path * @param string $path
* @param String $mode * @param string $mode
* @param Integer $options * @param int $options
* @param String $opened_path * @param string $opened_path
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _stream_open($path, $mode, $options, &$opened_path) function _stream_open($path, $mode, $options, &$opened_path)
@ -284,8 +284,8 @@ class Stream
/** /**
* Read from stream * Read from stream
* *
* @param Integer $count * @param int $count
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function _stream_read($count) function _stream_read($count)
@ -326,8 +326,8 @@ class Stream
/** /**
* Write to stream * Write to stream
* *
* @param String $data * @param string $data
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function _stream_write($data) function _stream_write($data)
@ -361,7 +361,7 @@ class Stream
/** /**
* Retrieve the current position of a stream * Retrieve the current position of a stream
* *
* @return Integer * @return int
* @access public * @access public
*/ */
function _stream_tell() function _stream_tell()
@ -379,7 +379,7 @@ class Stream
* will return false. do fread($fp, 1) and feof() will then return true. do fseek($fp, 10) on ablank file and feof() * will return false. do fread($fp, 1) and feof() will then return true. do fseek($fp, 10) on ablank file and feof()
* will return false. do fread($fp, 1) and feof() will then return true. * will return false. do fread($fp, 1) and feof() will then return true.
* *
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _stream_eof() function _stream_eof()
@ -390,9 +390,9 @@ class Stream
/** /**
* Seeks to specific location in a stream * Seeks to specific location in a stream
* *
* @param Integer $offset * @param int $offset
* @param Integer $whence * @param int $whence
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _stream_seek($offset, $whence) function _stream_seek($offset, $whence)
@ -418,10 +418,10 @@ class Stream
/** /**
* Change stream options * Change stream options
* *
* @param String $path * @param string $path
* @param Integer $option * @param int $option
* @param Mixed $var * @param mixed $var
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _stream_metadata($path, $option, $var) function _stream_metadata($path, $option, $var)
@ -452,8 +452,8 @@ class Stream
/** /**
* Retrieve the underlaying resource * Retrieve the underlaying resource
* *
* @param Integer $cast_as * @param int $cast_as
* @return Resource * @return resource
* @access public * @access public
*/ */
function _stream_cast($cast_as) function _stream_cast($cast_as)
@ -464,8 +464,8 @@ class Stream
/** /**
* Advisory file locking * Advisory file locking
* *
* @param Integer $operation * @param int $operation
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _stream_lock($operation) function _stream_lock($operation)
@ -480,9 +480,9 @@ class Stream
* If newname exists, it will be overwritten. This is a departure from what \phpseclib\Net\SFTP * If newname exists, it will be overwritten. This is a departure from what \phpseclib\Net\SFTP
* does. * does.
* *
* @param String $path_from * @param string $path_from
* @param String $path_to * @param string $path_to
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _rename($path_from, $path_to) function _rename($path_from, $path_to)
@ -532,9 +532,9 @@ class Stream
* string longname * string longname
* ATTRS attrs * ATTRS attrs
* *
* @param String $path * @param string $path
* @param Integer $options * @param int $options
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _dir_opendir($path, $options) function _dir_opendir($path, $options)
@ -551,7 +551,7 @@ class Stream
/** /**
* Read entry from directory handle * Read entry from directory handle
* *
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function _dir_readdir() function _dir_readdir()
@ -565,7 +565,7 @@ class Stream
/** /**
* Rewind directory handle * Rewind directory handle
* *
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _dir_rewinddir() function _dir_rewinddir()
@ -577,7 +577,7 @@ class Stream
/** /**
* Close directory handle * Close directory handle
* *
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _dir_closedir() function _dir_closedir()
@ -590,10 +590,10 @@ class Stream
* *
* Only valid $options is STREAM_MKDIR_RECURSIVE * Only valid $options is STREAM_MKDIR_RECURSIVE
* *
* @param String $path * @param string $path
* @param Integer $mode * @param int $mode
* @param Integer $options * @param int $options
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _mkdir($path, $mode, $options) function _mkdir($path, $mode, $options)
@ -614,10 +614,10 @@ class Stream
* STREAM_MKDIR_RECURSIVE is supposed to be set. Also, when I try it out with rmdir() I get 8 as * STREAM_MKDIR_RECURSIVE is supposed to be set. Also, when I try it out with rmdir() I get 8 as
* $options. What does 8 correspond to? * $options. What does 8 correspond to?
* *
* @param String $path * @param string $path
* @param Integer $mode * @param int $mode
* @param Integer $options * @param int $options
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _rmdir($path, $options) function _rmdir($path, $options)
@ -635,7 +635,7 @@ class Stream
* *
* See <http://php.net/fflush>. Always returns true because \phpseclib\Net\SFTP doesn't cache stuff before writing * See <http://php.net/fflush>. Always returns true because \phpseclib\Net\SFTP doesn't cache stuff before writing
* *
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _stream_flush() function _stream_flush()
@ -646,7 +646,7 @@ class Stream
/** /**
* Retrieve information about a file resource * Retrieve information about a file resource
* *
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function _stream_stat() function _stream_stat()
@ -661,8 +661,8 @@ class Stream
/** /**
* Delete a file * Delete a file
* *
* @param String $path * @param string $path
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _unlink($path) function _unlink($path)
@ -682,9 +682,9 @@ class Stream
* might be worthwhile to reconstruct bits 12-16 (ie. the file type) if mode doesn't have them but we'll * might be worthwhile to reconstruct bits 12-16 (ie. the file type) if mode doesn't have them but we'll
* cross that bridge when and if it's reached * cross that bridge when and if it's reached
* *
* @param String $path * @param string $path
* @param Integer $flags * @param int $flags
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function _url_stat($path, $flags) function _url_stat($path, $flags)
@ -705,8 +705,8 @@ class Stream
/** /**
* Truncate stream * Truncate stream
* *
* @param Integer $new_size * @param int $new_size
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _stream_truncate($new_size) function _stream_truncate($new_size)
@ -727,10 +727,10 @@ class Stream
* STREAM_OPTION_WRITE_BUFFER isn't supported for the same reason stream_flush isn't. * STREAM_OPTION_WRITE_BUFFER isn't supported for the same reason stream_flush isn't.
* The other two aren't supported because of limitations in \phpseclib\Net\SFTP. * The other two aren't supported because of limitations in \phpseclib\Net\SFTP.
* *
* @param Integer $option * @param int $option
* @param Integer $arg1 * @param int $arg1
* @param Integer $arg2 * @param int $arg2
* @return Boolean * @return bool
* @access public * @access public
*/ */
function _stream_set_option($option, $arg1, $arg2) function _stream_set_option($option, $arg1, $arg2)
@ -757,9 +757,9 @@ class Stream
* If NET_SFTP_STREAM_LOGGING is defined all calls will be output on the screen and then (regardless of whether or not * If NET_SFTP_STREAM_LOGGING is defined all calls will be output on the screen and then (regardless of whether or not
* NET_SFTP_STREAM_LOGGING is enabled) the parameters will be passed through to the appropriate method. * NET_SFTP_STREAM_LOGGING is enabled) the parameters will be passed through to the appropriate method.
* *
* @param String * @param string
* @param Array * @param array
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function __call($name, $arguments) function __call($name, $arguments)

View File

@ -224,7 +224,7 @@ class SSH1
/** /**
* The SSH identifier * The SSH identifier
* *
* @var String * @var string
* @access private * @access private
*/ */
var $identifier = 'SSH-1.5-phpseclib'; var $identifier = 'SSH-1.5-phpseclib';
@ -232,7 +232,7 @@ class SSH1
/** /**
* The Socket Object * The Socket Object
* *
* @var Object * @var object
* @access private * @access private
*/ */
var $fsock; var $fsock;
@ -240,7 +240,7 @@ class SSH1
/** /**
* The cryptography object * The cryptography object
* *
* @var Object * @var object
* @access private * @access private
*/ */
var $crypto = false; var $crypto = false;
@ -251,7 +251,7 @@ class SSH1
* The bits that are set represent functions that have been called already. This is used to determine * The bits that are set represent functions that have been called already. This is used to determine
* if a requisite function has been successfully executed. If not, an error should be thrown. * if a requisite function has been successfully executed. If not, an error should be thrown.
* *
* @var Integer * @var int
* @access private * @access private
*/ */
var $bitmap = 0; var $bitmap = 0;
@ -262,7 +262,7 @@ class SSH1
* Logged for debug purposes * Logged for debug purposes
* *
* @see \phpseclib\Net\SSH1::getServerKeyPublicExponent() * @see \phpseclib\Net\SSH1::getServerKeyPublicExponent()
* @var String * @var string
* @access private * @access private
*/ */
var $server_key_public_exponent; var $server_key_public_exponent;
@ -273,7 +273,7 @@ class SSH1
* Logged for debug purposes * Logged for debug purposes
* *
* @see \phpseclib\Net\SSH1::getServerKeyPublicModulus() * @see \phpseclib\Net\SSH1::getServerKeyPublicModulus()
* @var String * @var string
* @access private * @access private
*/ */
var $server_key_public_modulus; var $server_key_public_modulus;
@ -284,7 +284,7 @@ class SSH1
* Logged for debug purposes * Logged for debug purposes
* *
* @see \phpseclib\Net\SSH1::getHostKeyPublicExponent() * @see \phpseclib\Net\SSH1::getHostKeyPublicExponent()
* @var String * @var string
* @access private * @access private
*/ */
var $host_key_public_exponent; var $host_key_public_exponent;
@ -295,7 +295,7 @@ class SSH1
* Logged for debug purposes * Logged for debug purposes
* *
* @see \phpseclib\Net\SSH1::getHostKeyPublicModulus() * @see \phpseclib\Net\SSH1::getHostKeyPublicModulus()
* @var String * @var string
* @access private * @access private
*/ */
var $host_key_public_modulus; var $host_key_public_modulus;
@ -306,7 +306,7 @@ class SSH1
* Logged for debug purposes * Logged for debug purposes
* *
* @see \phpseclib\Net\SSH1::getSupportedCiphers() * @see \phpseclib\Net\SSH1::getSupportedCiphers()
* @var Array * @var array
* @access private * @access private
*/ */
var $supported_ciphers = array( var $supported_ciphers = array(
@ -325,7 +325,7 @@ class SSH1
* Logged for debug purposes * Logged for debug purposes
* *
* @see \phpseclib\Net\SSH1::getSupportedAuthentications() * @see \phpseclib\Net\SSH1::getSupportedAuthentications()
* @var Array * @var array
* @access private * @access private
*/ */
var $supported_authentications = array( var $supported_authentications = array(
@ -339,7 +339,7 @@ class SSH1
* Server Identification * Server Identification
* *
* @see \phpseclib\Net\SSH1::getServerIdentification() * @see \phpseclib\Net\SSH1::getServerIdentification()
* @var String * @var string
* @access private * @access private
*/ */
var $server_identification = ''; var $server_identification = '';
@ -348,7 +348,7 @@ class SSH1
* Protocol Flags * Protocol Flags
* *
* @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::__construct()
* @var Array * @var array
* @access private * @access private
*/ */
var $protocol_flags = array(); var $protocol_flags = array();
@ -357,7 +357,7 @@ class SSH1
* Protocol Flag Log * Protocol Flag Log
* *
* @see \phpseclib\Net\SSH1::getLog() * @see \phpseclib\Net\SSH1::getLog()
* @var Array * @var array
* @access private * @access private
*/ */
var $protocol_flag_log = array(); var $protocol_flag_log = array();
@ -366,7 +366,7 @@ class SSH1
* Message Log * Message Log
* *
* @see \phpseclib\Net\SSH1::getLog() * @see \phpseclib\Net\SSH1::getLog()
* @var Array * @var array
* @access private * @access private
*/ */
var $message_log = array(); var $message_log = array();
@ -375,7 +375,7 @@ class SSH1
* Real-time log file pointer * Real-time log file pointer
* *
* @see \phpseclib\Net\SSH1::_append_log() * @see \phpseclib\Net\SSH1::_append_log()
* @var Resource * @var resource
* @access private * @access private
*/ */
var $realtime_log_file; var $realtime_log_file;
@ -384,7 +384,7 @@ class SSH1
* Real-time log file size * Real-time log file size
* *
* @see \phpseclib\Net\SSH1::_append_log() * @see \phpseclib\Net\SSH1::_append_log()
* @var Integer * @var int
* @access private * @access private
*/ */
var $realtime_log_size; var $realtime_log_size;
@ -393,7 +393,7 @@ class SSH1
* Real-time log file wrap boolean * Real-time log file wrap boolean
* *
* @see \phpseclib\Net\SSH1::_append_log() * @see \phpseclib\Net\SSH1::_append_log()
* @var Boolean * @var bool
* @access private * @access private
*/ */
var $realtime_log_wrap; var $realtime_log_wrap;
@ -402,7 +402,7 @@ class SSH1
* Interactive Buffer * Interactive Buffer
* *
* @see \phpseclib\Net\SSH1::read() * @see \phpseclib\Net\SSH1::read()
* @var Array * @var array
* @access private * @access private
*/ */
var $interactiveBuffer = ''; var $interactiveBuffer = '';
@ -452,7 +452,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::__construct()
* @see \phpseclib\Net\SSH1::_connect() * @see \phpseclib\Net\SSH1::_connect()
* @var String * @var string
* @access private * @access private
*/ */
var $host; var $host;
@ -462,7 +462,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::__construct()
* @see \phpseclib\Net\SSH1::_connect() * @see \phpseclib\Net\SSH1::_connect()
* @var Integer * @var int
* @access private * @access private
*/ */
var $port; var $port;
@ -477,7 +477,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::__construct()
* @see \phpseclib\Net\SSH1::_connect() * @see \phpseclib\Net\SSH1::_connect()
* @var Integer * @var int
* @access private * @access private
*/ */
var $connectionTimeout; var $connectionTimeout;
@ -487,7 +487,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::__construct()
* @see \phpseclib\Net\SSH1::_connect() * @see \phpseclib\Net\SSH1::_connect()
* @var Integer * @var int
* @access private * @access private
*/ */
var $cipher; var $cipher;
@ -497,10 +497,10 @@ class SSH1
* *
* Connects to an SSHv1 server * Connects to an SSHv1 server
* *
* @param String $host * @param string $host
* @param optional Integer $port * @param int $port
* @param optional Integer $timeout * @param int $timeout
* @param optional Integer $cipher * @param int $cipher
* @return \phpseclib\Net\SSH1 * @return \phpseclib\Net\SSH1
* @access public * @access public
*/ */
@ -536,7 +536,7 @@ class SSH1
/** /**
* Connect to an SSHv1 server * Connect to an SSHv1 server
* *
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _connect() function _connect()
@ -694,9 +694,9 @@ class SSH1
/** /**
* Login * Login
* *
* @param String $username * @param string $username
* @param optional String $password * @param string $password
* @return Boolean * @return bool
* @access public * @access public
*/ */
function login($username, $password = '') function login($username, $password = '')
@ -767,7 +767,7 @@ class SSH1
* $ssh->exec('ping 127.0.0.1'); on a Linux host will never return and will run indefinitely. setTimeout() makes it so it'll timeout. * $ssh->exec('ping 127.0.0.1'); on a Linux host will never return and will run indefinitely. setTimeout() makes it so it'll timeout.
* Setting $timeout to false or 0 will mean there is no timeout. * Setting $timeout to false or 0 will mean there is no timeout.
* *
* @param Mixed $timeout * @param mixed $timeout
*/ */
function setTimeout($timeout) function setTimeout($timeout)
{ {
@ -790,7 +790,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::interactiveRead() * @see \phpseclib\Net\SSH1::interactiveRead()
* @see \phpseclib\Net\SSH1::interactiveWrite() * @see \phpseclib\Net\SSH1::interactiveWrite()
* @param String $cmd * @param string $cmd
* @return mixed * @return mixed
* @access public * @access public
*/ */
@ -840,7 +840,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::interactiveRead() * @see \phpseclib\Net\SSH1::interactiveRead()
* @see \phpseclib\Net\SSH1::interactiveWrite() * @see \phpseclib\Net\SSH1::interactiveWrite()
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _initShell() function _initShell()
@ -883,8 +883,8 @@ class SSH1
* Inputs a command into an interactive shell. * Inputs a command into an interactive shell.
* *
* @see \phpseclib\Net\SSH1::interactiveWrite() * @see \phpseclib\Net\SSH1::interactiveWrite()
* @param String $cmd * @param string $cmd
* @return Boolean * @return bool
* @access public * @access public
*/ */
function write($cmd) function write($cmd)
@ -899,9 +899,9 @@ class SSH1
* a regular expression. * a regular expression.
* *
* @see \phpseclib\Net\SSH1::write() * @see \phpseclib\Net\SSH1::write()
* @param String $expect * @param string $expect
* @param Integer $mode * @param int $mode
* @return Boolean * @return bool
* @access public * @access public
*/ */
function read($expect, $mode = self::READ__SIMPLE) function read($expect, $mode = self::READ__SIMPLE)
@ -939,8 +939,8 @@ class SSH1
* Inputs a command into an interactive shell. * Inputs a command into an interactive shell.
* *
* @see \phpseclib\Net\SSH1::interactiveRead() * @see \phpseclib\Net\SSH1::interactiveRead()
* @param String $cmd * @param string $cmd
* @return Boolean * @return bool
* @access public * @access public
*/ */
function interactiveWrite($cmd) function interactiveWrite($cmd)
@ -975,7 +975,7 @@ class SSH1
* there's not going to be much recourse. * there's not going to be much recourse.
* *
* @see \phpseclib\Net\SSH1::interactiveRead() * @see \phpseclib\Net\SSH1::interactiveRead()
* @return String * @return string
* @access public * @access public
*/ */
function interactiveRead() function interactiveRead()
@ -1026,7 +1026,7 @@ class SSH1
/** /**
* Disconnect * Disconnect
* *
* @param String $msg * @param string $msg
* @access private * @access private
*/ */
function _disconnect($msg = 'Client Quit') function _disconnect($msg = 'Client Quit')
@ -1064,7 +1064,7 @@ class SSH1
* http://www.securiteam.com/securitynews/5LP042K3FY.html * http://www.securiteam.com/securitynews/5LP042K3FY.html
* *
* @see \phpseclib\Net\SSH1::_send_binary_packet() * @see \phpseclib\Net\SSH1::_send_binary_packet()
* @return Array * @return array
* @access private * @access private
*/ */
function _get_binary_packet() function _get_binary_packet()
@ -1140,8 +1140,8 @@ class SSH1
* Returns true on success, false on failure. * Returns true on success, false on failure.
* *
* @see \phpseclib\Net\SSH1::_get_binary_packet() * @see \phpseclib\Net\SSH1::_get_binary_packet()
* @param String $data * @param string $data
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _send_binary_packet($data) function _send_binary_packet($data)
@ -1188,8 +1188,8 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::_get_binary_packet() * @see \phpseclib\Net\SSH1::_get_binary_packet()
* @see \phpseclib\Net\SSH1::_send_binary_packet() * @see \phpseclib\Net\SSH1::_send_binary_packet()
* @param String $data * @param string $data
* @return Integer * @return int
* @access private * @access private
*/ */
function _crc($data) function _crc($data)
@ -1284,9 +1284,9 @@ class SSH1
* *
* Inspired by array_shift * Inspired by array_shift
* *
* @param String $string * @param string $string
* @param optional Integer $index * @param int $index
* @return String * @return string
* @access private * @access private
*/ */
function _string_shift(&$string, $index = 1) function _string_shift(&$string, $index = 1)
@ -1305,7 +1305,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::__construct()
* @param BigInteger $m * @param BigInteger $m
* @param Array $key * @param array $key
* @return BigInteger * @return BigInteger
* @access private * @access private
*/ */
@ -1354,7 +1354,7 @@ class SSH1
* named constants from it, using the value as the name of the constant and the index as the value of the constant. * named constants from it, using the value as the name of the constant and the index as the value of the constant.
* If any of the constants that would be defined already exists, none of the constants will be defined. * If any of the constants that would be defined already exists, none of the constants will be defined.
* *
* @param Array $array * @param array $array
* @access private * @access private
*/ */
function _define_array() function _define_array()
@ -1377,7 +1377,7 @@ class SSH1
* Returns a string if NET_SSH1_LOGGING == self::LOG_COMPLEX, an array if NET_SSH1_LOGGING == self::LOG_SIMPLE and false if !defined('NET_SSH1_LOGGING') * Returns a string if NET_SSH1_LOGGING == self::LOG_COMPLEX, an array if NET_SSH1_LOGGING == self::LOG_SIMPLE and false if !defined('NET_SSH1_LOGGING')
* *
* @access public * @access public
* @return String or Array * @return string or Array
*/ */
function getLog() function getLog()
{ {
@ -1400,10 +1400,10 @@ class SSH1
/** /**
* Formats a log for printing * Formats a log for printing
* *
* @param Array $message_log * @param array $message_log
* @param Array $message_number_log * @param array $message_number_log
* @access private * @access private
* @return String * @return string
*/ */
function _format_log($message_log, $message_number_log) function _format_log($message_log, $message_number_log)
{ {
@ -1436,9 +1436,9 @@ class SSH1
* *
* For use with preg_replace_callback() * For use with preg_replace_callback()
* *
* @param Array $matches * @param array $matches
* @access private * @access private
* @return String * @return string
*/ */
function _format_log_helper($matches) function _format_log_helper($matches)
{ {
@ -1451,8 +1451,8 @@ class SSH1
* Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, * Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead,
* the raw bytes. This behavior is similar to PHP's md5() function. * the raw bytes. This behavior is similar to PHP's md5() function.
* *
* @param optional Boolean $raw_output * @param bool $raw_output
* @return String * @return string
* @access public * @access public
*/ */
function getServerKeyPublicExponent($raw_output = false) function getServerKeyPublicExponent($raw_output = false)
@ -1466,8 +1466,8 @@ class SSH1
* Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, * Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead,
* the raw bytes. This behavior is similar to PHP's md5() function. * the raw bytes. This behavior is similar to PHP's md5() function.
* *
* @param optional Boolean $raw_output * @param bool $raw_output
* @return String * @return string
* @access public * @access public
*/ */
function getServerKeyPublicModulus($raw_output = false) function getServerKeyPublicModulus($raw_output = false)
@ -1481,8 +1481,8 @@ class SSH1
* Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, * Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead,
* the raw bytes. This behavior is similar to PHP's md5() function. * the raw bytes. This behavior is similar to PHP's md5() function.
* *
* @param optional Boolean $raw_output * @param bool $raw_output
* @return String * @return string
* @access public * @access public
*/ */
function getHostKeyPublicExponent($raw_output = false) function getHostKeyPublicExponent($raw_output = false)
@ -1496,8 +1496,8 @@ class SSH1
* Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, * Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead,
* the raw bytes. This behavior is similar to PHP's md5() function. * the raw bytes. This behavior is similar to PHP's md5() function.
* *
* @param optional Boolean $raw_output * @param bool $raw_output
* @return String * @return string
* @access public * @access public
*/ */
function getHostKeyPublicModulus($raw_output = false) function getHostKeyPublicModulus($raw_output = false)
@ -1512,8 +1512,8 @@ class SSH1
* is set to true, returns, instead, an array of constants. ie. instead of array('Triple-DES in CBC mode'), you'll * is set to true, returns, instead, an array of constants. ie. instead of array('Triple-DES in CBC mode'), you'll
* get array(self::CIPHER_3DES). * get array(self::CIPHER_3DES).
* *
* @param optional Boolean $raw_output * @param bool $raw_output
* @return Array * @return array
* @access public * @access public
*/ */
function getSupportedCiphers($raw_output = false) function getSupportedCiphers($raw_output = false)
@ -1528,8 +1528,8 @@ class SSH1
* is set to true, returns, instead, an array of constants. ie. instead of array('password authentication'), you'll * is set to true, returns, instead, an array of constants. ie. instead of array('password authentication'), you'll
* get array(self::AUTH_PASSWORD). * get array(self::AUTH_PASSWORD).
* *
* @param optional Boolean $raw_output * @param bool $raw_output
* @return Array * @return array
* @access public * @access public
*/ */
function getSupportedAuthentications($raw_output = false) function getSupportedAuthentications($raw_output = false)
@ -1540,7 +1540,7 @@ class SSH1
/** /**
* Return the server identification. * Return the server identification.
* *
* @return String * @return string
* @access public * @access public
*/ */
function getServerIdentification() function getServerIdentification()
@ -1553,7 +1553,7 @@ class SSH1
* *
* Makes sure that only the last 1MB worth of packets will be logged * Makes sure that only the last 1MB worth of packets will be logged
* *
* @param String $data * @param string $data
* @access private * @access private
*/ */
function _append_log($protocol_flags, $message) function _append_log($protocol_flags, $message)

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,7 @@ class Agent
/** /**
* Socket Resource * Socket Resource
* *
* @var Resource * @var resource
* @access private * @access private
*/ */
var $fsock; var $fsock;
@ -143,7 +143,7 @@ class Agent
* See "2.5.2 Requesting a list of protocol 2 keys" * See "2.5.2 Requesting a list of protocol 2 keys"
* Returns an array containing zero or more \phpseclib\System\SSH\Agent\Identity objects * Returns an array containing zero or more \phpseclib\System\SSH\Agent\Identity objects
* *
* @return Array * @return array
* @access public * @access public
*/ */
function requestIdentities() function requestIdentities()
@ -199,7 +199,7 @@ class Agent
* be requested when a channel is opened * be requested when a channel is opened
* *
* @param Net_SSH2 $ssh * @param Net_SSH2 $ssh
* @return Boolean * @return bool
* @access public * @access public
*/ */
function startSSHForwarding($ssh) function startSSHForwarding($ssh)
@ -213,7 +213,7 @@ class Agent
* Request agent forwarding of remote server * Request agent forwarding of remote server
* *
* @param Net_SSH2 $ssh * @param Net_SSH2 $ssh
* @return Boolean * @return bool
* @access private * @access private
*/ */
function _request_forwarding($ssh) function _request_forwarding($ssh)
@ -269,7 +269,7 @@ class Agent
/** /**
* Forward data to SSH Agent and return data reply * Forward data to SSH Agent and return data reply
* *
* @param String $data * @param string $data
* @return data from SSH Agent * @return data from SSH Agent
* @access private * @access private
*/ */

View File

@ -45,7 +45,7 @@ class Identity
/** /**
* Key Blob * Key Blob
* *
* @var String * @var string
* @access private * @access private
* @see \phpseclib\System\SSH\Agent\Identity::sign() * @see \phpseclib\System\SSH\Agent\Identity::sign()
*/ */
@ -54,7 +54,7 @@ class Identity
/** /**
* Socket Resource * Socket Resource
* *
* @var Resource * @var resource
* @access private * @access private
* @see \phpseclib\System\SSH\Agent\Identity::sign() * @see \phpseclib\System\SSH\Agent\Identity::sign()
*/ */
@ -63,7 +63,7 @@ class Identity
/** /**
* Default Constructor. * Default Constructor.
* *
* @param Resource $fsock * @param resource $fsock
* @return \phpseclib\System\SSH\Agent\Identity * @return \phpseclib\System\SSH\Agent\Identity
* @access private * @access private
*/ */
@ -92,7 +92,7 @@ class Identity
* Called by \phpseclib\System\SSH\Agent::requestIdentities(). The key blob could be extracted from $this->key * Called by \phpseclib\System\SSH\Agent::requestIdentities(). The key blob could be extracted from $this->key
* but this saves a small amount of computation. * but this saves a small amount of computation.
* *
* @param String $key_blob * @param string $key_blob
* @access private * @access private
*/ */
function setPublicKeyBlob($key_blob) function setPublicKeyBlob($key_blob)
@ -105,8 +105,8 @@ class Identity
* *
* Wrapper for $this->key->getPublicKey() * Wrapper for $this->key->getPublicKey()
* *
* @param Integer $format optional * @param int $format optional
* @return Mixed * @return mixed
* @access public * @access public
*/ */
function getPublicKey($format = null) function getPublicKey($format = null)
@ -120,7 +120,7 @@ class Identity
* Doesn't do anything as ssh-agent doesn't let you pick and choose the signature mode. ie. * Doesn't do anything as ssh-agent doesn't let you pick and choose the signature mode. ie.
* ssh-agent's only supported mode is \phpseclib\Crypt\RSA::SIGNATURE_PKCS1 * ssh-agent's only supported mode is \phpseclib\Crypt\RSA::SIGNATURE_PKCS1
* *
* @param Integer $mode * @param int $mode
* @access public * @access public
*/ */
function setSignatureMode($mode) function setSignatureMode($mode)
@ -132,8 +132,8 @@ class Identity
* *
* See "2.6.2 Protocol 2 private key signature request" * See "2.6.2 Protocol 2 private key signature request"
* *
* @param String $message * @param string $message
* @return String * @return string
* @access public * @access public
*/ */
function sign($message) function sign($message)