From 5890f3da9845e74ffcf5d65e20c3cc5b100e3188 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 2 Sep 2015 00:22:30 +0100 Subject: [PATCH 1/4] Fixed invalid param phpdoc --- phpseclib/Crypt/Base.php | 8 +++---- phpseclib/Crypt/Hash.php | 6 ++--- phpseclib/Crypt/RC2.php | 2 +- phpseclib/Crypt/RSA.php | 8 +++---- phpseclib/Crypt/Rijndael.php | 2 +- phpseclib/Crypt/TripleDES.php | 2 +- phpseclib/File/ASN1.php | 6 ++--- phpseclib/Math/BigInteger.php | 12 +++++----- phpseclib/Net/SCP.php | 10 ++++----- phpseclib/Net/SFTP.php | 42 +++++++++++++++++------------------ phpseclib/Net/SFTP/Stream.php | 2 +- phpseclib/Net/SSH1.php | 22 +++++++++--------- phpseclib/Net/SSH2.php | 12 +++++----- 13 files changed, 67 insertions(+), 67 deletions(-) diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index 9f324843..1ee2ad51 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -491,7 +491,7 @@ class Crypt_Base * * If not explicitly set, CRYPT_MODE_CBC will be used. * - * @param optional Integer $mode + * @param Integer $mode * @access public */ function Crypt_Base($mode = CRYPT_MODE_CBC) @@ -574,7 +574,7 @@ class Crypt_Base * * @see Crypt/Hash.php * @param String $password - * @param optional String $method + * @param String $method * @return Boolean * @access public * @internal Could, but not must, extend by the child Crypt_* class @@ -1882,7 +1882,7 @@ class Crypt_Base * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @access private * @return String */ @@ -1899,7 +1899,7 @@ class Crypt_Base * Inspired by array_pop * * @param String $string - * @param optional Integer $index + * @param Integer $index * @access private * @return String */ diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index ce440635..8ba693ed 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -147,7 +147,7 @@ class Crypt_Hash /** * Default Constructor. * - * @param optional String $hash + * @param String $hash * @return Crypt_Hash * @access public */ @@ -175,7 +175,7 @@ class Crypt_Hash * Keys can be of any length. * * @access public - * @param optional String $key + * @param String $key */ function setKey($key = false) { @@ -830,7 +830,7 @@ class Crypt_Hash * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ diff --git a/phpseclib/Crypt/RC2.php b/phpseclib/Crypt/RC2.php index ddf8f2d6..8cad81dc 100644 --- a/phpseclib/Crypt/RC2.php +++ b/phpseclib/Crypt/RC2.php @@ -344,7 +344,7 @@ class Crypt_RC2 extends Crypt_Base * If not explicitly set, CRYPT_RC2_MODE_CBC will be used. * * @see Crypt_Base::Crypt_Base() - * @param optional Integer $mode + * @param Integer $mode * @access public */ function Crypt_RC2($mode = CRYPT_RC2_MODE_CBC) diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index b8602bd8..003ceba0 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -571,9 +571,9 @@ class Crypt_RSA * Will need to be passed back to Crypt_RSA::createKey() as the third parameter for further processing. * * @access public - * @param optional Integer $bits - * @param optional Integer $timeout - * @param optional Math_BigInteger $p + * @param Integer $bits + * @param Integer $timeout + * @param Math_BigInteger $p */ function createKey($bits = 1024, $timeout = false, $partial = array()) { @@ -2009,7 +2009,7 @@ class Crypt_RSA * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index dd5c75d3..08034b89 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -280,7 +280,7 @@ class Crypt_Rijndael extends Crypt_Base * If not explictly set, CRYPT_RIJNDAEL_MODE_CBC will be used. * * @see Crypt_Base::Crypt_Base() - * @param optional Integer $mode + * @param Integer $mode * @access public */ function Crypt_Rijndael($mode = CRYPT_RIJNDAEL_MODE_CBC) diff --git a/phpseclib/Crypt/TripleDES.php b/phpseclib/Crypt/TripleDES.php index 5e63f361..67ac492d 100644 --- a/phpseclib/Crypt/TripleDES.php +++ b/phpseclib/Crypt/TripleDES.php @@ -195,7 +195,7 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_DES::Crypt_DES() * @see Crypt_Base::Crypt_Base() - * @param optional Integer $mode + * @param Integer $mode * @access public */ function Crypt_TripleDES($mode = CRYPT_MODE_CBC) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 3b8db023..4eaf85ab 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -1257,7 +1257,7 @@ class File_ASN1 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ @@ -1275,8 +1275,8 @@ class File_ASN1 * No real conversion table is used. * * @param String $in - * @param optional Integer $from - * @param optional Integer $to + * @param Integer $from + * @param Integer $to * @return String * @access public */ diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 94362a69..799829e3 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -246,8 +246,8 @@ class Math_BigInteger * ?> * * - * @param optional $x base-10 number or base-$base number if $base set. - * @param optional integer $base + * @param $x base-10 number or base-$base number if $base set. + * @param integer $base * @return Math_BigInteger * @access public */ @@ -3113,7 +3113,7 @@ class Math_BigInteger * $max->random($min) * * @param Math_BigInteger $arg1 - * @param optional Math_BigInteger $arg2 + * @param Math_BigInteger $arg2 * @return Math_BigInteger * @access public * @internal The API for creating random numbers used to be $a->random($min, $max), where $a was a Math_BigInteger object. @@ -3194,8 +3194,8 @@ class Math_BigInteger * give up and return false. * * @param Math_BigInteger $arg1 - * @param optional Math_BigInteger $arg2 - * @param optional Integer $timeout + * @param Math_BigInteger $arg2 + * @param Integer $timeout * @return Mixed * @access public * @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap4.pdf#page=15 HAC 4.44}. @@ -3323,7 +3323,7 @@ class Math_BigInteger * $t parameter is distributability. Math_BigInteger::randomPrime() can be distributed across multiple pageloads * on a website instead of just one. * - * @param optional Math_BigInteger $t + * @param Math_BigInteger $t * @return Boolean * @access public * @internal Uses the diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index d73be75f..1bdffb97 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -117,8 +117,8 @@ class Net_SCP * Connects to an SSH server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @return Net_SCP * @access public */ @@ -159,8 +159,8 @@ class Net_SCP * * @param String $remote_file * @param String $data - * @param optional Integer $mode - * @param optional Callable $callback + * @param Integer $mode + * @param Callable $callback * @return Boolean * @access public */ @@ -234,7 +234,7 @@ class Net_SCP * operation * * @param String $remote_file - * @param optional String $local_file + * @param String $local_file * @return Mixed * @access public */ diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 5f79caf1..6f93ec04 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -283,8 +283,8 @@ class Net_SFTP extends Net_SSH2 * Connects to an SFTP server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @return Net_SFTP * @access public */ @@ -421,7 +421,7 @@ class Net_SFTP extends Net_SSH2 * Login * * @param String $username - * @param optional String $password + * @param String $password * @return Boolean * @access public */ @@ -622,7 +622,7 @@ class Net_SFTP extends Net_SSH2 * Logs errors * * @param String $response - * @param optional Integer $status + * @param Integer $status * @access public */ function _logError($response, $status = -1) @@ -766,8 +766,8 @@ class Net_SFTP extends Net_SSH2 /** * Returns a list of files in the given directory * - * @param optional String $dir - * @param optional Boolean $recursive + * @param String $dir + * @param Boolean $recursive * @return Mixed * @access public */ @@ -815,8 +815,8 @@ class Net_SFTP extends Net_SSH2 /** * Returns a detailed list of files in the given directory * - * @param optional String $dir - * @param optional Boolean $recursive + * @param String $dir + * @param Boolean $recursive * @return Mixed * @access public */ @@ -850,7 +850,7 @@ class Net_SFTP extends Net_SSH2 * Reads a list, be it detailed or not, of files in the given directory * * @param String $dir - * @param optional Boolean $raw + * @param Boolean $raw * @return Mixed * @access private */ @@ -1343,8 +1343,8 @@ class Net_SFTP extends Net_SSH2 * If the file does not exist, it will be created. * * @param String $filename - * @param optional Integer $time - * @param optional Integer $atime + * @param Integer $time + * @param Integer $atime * @return Boolean * @access public */ @@ -1395,7 +1395,7 @@ class Net_SFTP extends Net_SSH2 * * @param String $filename * @param Integer $uid - * @param optional Boolean $recursive + * @param Boolean $recursive * @return Boolean * @access public */ @@ -1415,7 +1415,7 @@ class Net_SFTP extends Net_SSH2 * * @param String $filename * @param Integer $gid - * @param optional Boolean $recursive + * @param Boolean $recursive * @return Boolean * @access public */ @@ -1434,7 +1434,7 @@ class Net_SFTP extends Net_SSH2 * * @param Integer $mode * @param String $filename - * @param optional Boolean $recursive + * @param Boolean $recursive * @return Mixed * @access public */ @@ -1831,10 +1831,10 @@ class Net_SFTP extends Net_SSH2 * * @param String $remote_file * @param String|resource $data - * @param optional Integer $mode - * @param optional Integer $start - * @param optional Integer $local_start - * @param optional callable|null $progressCallback + * @param Integer $mode + * @param Integer $start + * @param Integer $local_start + * @param callable|null $progressCallback * @return Boolean * @access public * @internal ASCII mode for SFTPv4/5/6 can be supported by adding a new function - Net_SFTP::setMode(). @@ -2052,9 +2052,9 @@ class Net_SFTP extends Net_SSH2 * $offset and $length can be used to download files in chunks. * * @param String $remote_file - * @param optional String $local_file - * @param optional Integer $offset - * @param optional Integer $length + * @param String $local_file + * @param Integer $offset + * @param Integer $length * @return Mixed * @access public */ diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index 0085b959..eaf10115 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -128,7 +128,7 @@ class Net_SFTP_Stream /** * 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. * @access public */ diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index 3fa599af..22d9ba1f 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -509,9 +509,9 @@ class Net_SSH1 * Connects to an SSHv1 server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout - * @param optional Integer $cipher + * @param Integer $port + * @param Integer $timeout + * @param Integer $cipher * @return Net_SSH1 * @access public */ @@ -728,7 +728,7 @@ class Net_SSH1 * Login * * @param String $username - * @param optional String $password + * @param String $password * @return Boolean * @access public */ @@ -1318,7 +1318,7 @@ class Net_SSH1 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ @@ -1488,7 +1488,7 @@ class Net_SSH1 * 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. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1503,7 +1503,7 @@ class Net_SSH1 * 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. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1518,7 +1518,7 @@ class Net_SSH1 * 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. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1533,7 +1533,7 @@ class Net_SSH1 * 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. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1549,7 +1549,7 @@ class Net_SSH1 * is set to true, returns, instead, an array of constants. ie. instead of array('Triple-DES in CBC mode'), you'll * get array(NET_SSH1_CIPHER_3DES). * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return Array * @access public */ @@ -1565,7 +1565,7 @@ class Net_SSH1 * is set to true, returns, instead, an array of constants. ie. instead of array('password authentication'), you'll * get array(NET_SSH1_AUTH_PASSWORD). * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return Array * @access public */ diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 35866f05..98cce0b7 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -877,8 +877,8 @@ class Net_SSH2 * $host can either be a string, representing the host, or a stream resource. * * @param Mixed $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @see Net_SSH2::login() * @return Net_SSH2 * @access public @@ -1986,7 +1986,7 @@ class Net_SSH2 * Login Helper * * @param String $username - * @param optional String $password + * @param String $password * @return Boolean * @access private * @internal It might be worthwhile, at some point, to protect against {@link http://tools.ietf.org/html/rfc4251#section-9.3.9 traffic analysis} @@ -2462,7 +2462,7 @@ class Net_SSH2 * In all likelihood, this is not a feature you want to be taking advantage of. * * @param String $command - * @param optional Callback $callback + * @param Callback $callback * @return String * @access public */ @@ -3478,7 +3478,7 @@ class Net_SSH2 * See '6. Binary Packet Protocol' of rfc4253 for more info. * * @param String $data - * @param optional String $logged + * @param String $logged * @see Net_SSH2::_get_binary_packet() * @return Boolean * @access private @@ -3717,7 +3717,7 @@ class Net_SSH2 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ From cd0e10cf9d6e747f8daa15816cb6eae01a95bdd6 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 2 Sep 2015 00:37:54 +0100 Subject: [PATCH 2/4] Fixed lots of phpdoc typos --- phpseclib/Crypt/AES.php | 8 +- phpseclib/Crypt/Base.php | 136 +++++------ phpseclib/Crypt/Blowfish.php | 26 +-- phpseclib/Crypt/DES.php | 62 +++--- phpseclib/Crypt/Hash.php | 64 +++--- phpseclib/Crypt/RC2.php | 52 ++--- phpseclib/Crypt/RC4.php | 34 +-- phpseclib/Crypt/RSA.php | 242 ++++++++++---------- phpseclib/Crypt/Random.php | 4 +- phpseclib/Crypt/Rijndael.php | 52 ++--- phpseclib/Crypt/TripleDES.php | 38 ++-- phpseclib/Crypt/Twofish.php | 46 ++-- phpseclib/File/ANSI.php | 52 ++--- phpseclib/File/ASN1.php | 80 +++---- phpseclib/File/X509.php | 396 ++++++++++++++++----------------- phpseclib/Math/BigInteger.php | 232 +++++++++---------- phpseclib/Net/SCP.php | 32 +-- phpseclib/Net/SFTP.php | 336 ++++++++++++++-------------- phpseclib/Net/SFTP/Stream.php | 138 ++++++------ phpseclib/Net/SSH1.php | 144 ++++++------ phpseclib/Net/SSH2.php | 308 ++++++++++++------------- phpseclib/System/SSH/Agent.php | 28 +-- 22 files changed, 1255 insertions(+), 1255 deletions(-) diff --git a/phpseclib/Crypt/AES.php b/phpseclib/Crypt/AES.php index 7adc5307..4d6b2794 100644 --- a/phpseclib/Crypt/AES.php +++ b/phpseclib/Crypt/AES.php @@ -124,7 +124,7 @@ class Crypt_AES extends Crypt_Rijndael * The namespace used by the cipher for its constants. * * @see Crypt_Base::const_namespace - * @var String + * @var string * @access private */ var $const_namespace = 'AES'; @@ -136,7 +136,7 @@ class Crypt_AES extends Crypt_Rijndael * * @see Crypt_Rijndael::setBlockLength() * @access public - * @param Integer $length + * @param int $length */ function setBlockLength($length) { @@ -151,7 +151,7 @@ class Crypt_AES extends Crypt_Rijndael * * @see Crypt_Rijndael:setKeyLength() * @access public - * @param Integer $length + * @param int $length */ function setKeyLength($length) { @@ -173,7 +173,7 @@ class Crypt_AES extends Crypt_Rijndael * @see Crypt_Rijndael:setKey() * @see setKeyLength() * @access public - * @param String $key + * @param string $key */ function setKey($key) { diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index 1ee2ad51..2dfa2310 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -128,7 +128,7 @@ class Crypt_Base * The Encryption Mode * * @see Crypt_Base::Crypt_Base() - * @var Integer + * @var int * @access private */ var $mode; @@ -136,7 +136,7 @@ class Crypt_Base /** * The Block Length of the block cipher * - * @var Integer + * @var int * @access private */ var $block_size = 16; @@ -145,7 +145,7 @@ class Crypt_Base * The Key * * @see Crypt_Base::setKey() - * @var String + * @var string * @access private */ var $key = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; @@ -154,7 +154,7 @@ class Crypt_Base * The Initialization Vector * * @see Crypt_Base::setIV() - * @var String + * @var string * @access private */ var $iv; @@ -164,7 +164,7 @@ class Crypt_Base * * @see Crypt_Base::enableContinuousBuffer() * @see Crypt_Base::_clearBuffers() - * @var String + * @var string * @access private */ var $encryptIV; @@ -174,7 +174,7 @@ class Crypt_Base * * @see Crypt_Base::enableContinuousBuffer() * @see Crypt_Base::_clearBuffers() - * @var String + * @var string * @access private */ var $decryptIV; @@ -183,7 +183,7 @@ class Crypt_Base * Continuous Buffer status * * @see Crypt_Base::enableContinuousBuffer() - * @var Boolean + * @var bool * @access private */ var $continuousBuffer = false; @@ -193,7 +193,7 @@ class Crypt_Base * * @see Crypt_Base::encrypt() * @see Crypt_Base::_clearBuffers() - * @var Array + * @var array * @access private */ var $enbuffer; @@ -203,7 +203,7 @@ class Crypt_Base * * @see Crypt_Base::decrypt() * @see Crypt_Base::_clearBuffers() - * @var Array + * @var array * @access private */ var $debuffer; @@ -215,7 +215,7 @@ class Crypt_Base * Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode. * * @see Crypt_Base::encrypt() - * @var Resource + * @var resource * @access private */ var $enmcrypt; @@ -227,7 +227,7 @@ class Crypt_Base * Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode. * * @see Crypt_Base::decrypt() - * @var Resource + * @var resource * @access private */ var $demcrypt; @@ -237,7 +237,7 @@ class Crypt_Base * * @see Crypt_Twofish::setKey() * @see Crypt_Twofish::setIV() - * @var Boolean + * @var bool * @access private */ var $enchanged = true; @@ -247,7 +247,7 @@ class Crypt_Base * * @see Crypt_Twofish::setKey() * @see Crypt_Twofish::setIV() - * @var Boolean + * @var bool * @access private */ var $dechanged = true; @@ -266,7 +266,7 @@ class Crypt_Base * @see Crypt_Base::encrypt() * @see Crypt_Base::decrypt() * @see Crypt_Base::_setupMcrypt() - * @var Resource + * @var resource * @access private */ var $ecb; @@ -288,7 +288,7 @@ class Crypt_Base * on its internaly Key-expanding algorithm. * * @see Crypt_Base::encrypt() - * @var Integer + * @var int * @access private */ var $cfb_init_len = 600; @@ -299,7 +299,7 @@ class Crypt_Base * @see setKey() * @see setIV() * @see disableContinuousBuffer() - * @var Boolean + * @var bool * @access private */ var $changed = true; @@ -308,7 +308,7 @@ class Crypt_Base * Padding status * * @see Crypt_Base::enablePadding() - * @var Boolean + * @var bool * @access private */ var $padding = true; @@ -317,7 +317,7 @@ class Crypt_Base * Is the mode one that is paddable? * * @see Crypt_Base::Crypt_Base() - * @var Boolean + * @var bool * @access private */ var $paddable = false; @@ -334,7 +334,7 @@ class Crypt_Base * @see Crypt_Base::_setEngine() * @see Crypt_Base::encrypt() * @see Crypt_Base::decrypt() - * @var Integer + * @var int * @access private */ var $engine; @@ -344,7 +344,7 @@ class Crypt_Base * * @see Crypt_Base::_setEngine() * @see Crypt_Base::setPreferredEngine() - * @var Integer + * @var int * @access private */ var $preferredEngine; @@ -357,7 +357,7 @@ class Crypt_Base * @link http://www.php.net/mcrypt_module_open * @link http://www.php.net/mcrypt_list_algorithms * @see Crypt_Base::_setupMcrypt() - * @var String + * @var string * @access private */ var $cipher_name_mcrypt; @@ -368,7 +368,7 @@ class Crypt_Base * Only used if $engine == CRYPT_ENGINE_OPENSSL * * @link http://www.php.net/openssl-get-cipher-methods - * @var String + * @var string * @access private */ var $cipher_name_openssl; @@ -380,7 +380,7 @@ class Crypt_Base * it can still be emulated with ECB mode. * * @link http://www.php.net/openssl-get-cipher-methods - * @var String + * @var string * @access private */ var $cipher_name_openssl_ecb; @@ -389,7 +389,7 @@ class Crypt_Base * The default password key_size used by setPassword() * * @see Crypt_Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 32; @@ -398,7 +398,7 @@ class Crypt_Base * The default salt used by setPassword() * * @see Crypt_Base::setPassword() - * @var String + * @var string * @access private */ var $password_default_salt = 'phpseclib/salt'; @@ -421,7 +421,7 @@ class Crypt_Base * $aes = new Crypt_AES(CRYPT_MODE_CFB); // identical * * @see Crypt_Base::Crypt_Base() - * @var String + * @var string * @access private */ var $const_namespace; @@ -456,7 +456,7 @@ class Crypt_Base * If OpenSSL can be used in ECB but not in CTR we can emulate CTR * * @see Crypt_Base::_openssl_ctr_process() - * @var Boolean + * @var bool * @access private */ var $openssl_emulate_ctr = false; @@ -491,7 +491,7 @@ class Crypt_Base * * If not explicitly set, CRYPT_MODE_CBC will be used. * - * @param Integer $mode + * @param int $mode * @access public */ function Crypt_Base($mode = CRYPT_MODE_CBC) @@ -529,7 +529,7 @@ class Crypt_Base * to be all zero's. * * @access public - * @param String $iv + * @param string $iv * @internal Can be overwritten by a sub class, but does not have to be */ function setIV($iv) @@ -553,7 +553,7 @@ class Crypt_Base * If the key is not explicitly set, it'll be assumed to be all null bytes. * * @access public - * @param String $key + * @param string $key * @internal Could, but not must, extend by the child Crypt_* class */ function setKey($key) @@ -573,9 +573,9 @@ class Crypt_Base * Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php * * @see Crypt/Hash.php - * @param String $password - * @param String $method - * @return Boolean + * @param string $password + * @param string $method + * @return bool * @access public * @internal Could, but not must, extend by the child Crypt_* class */ @@ -672,8 +672,8 @@ class Crypt_Base * * @see Crypt_Base::decrypt() * @access public - * @param String $plaintext - * @return String $ciphertext + * @param string $plaintext + * @return string $ciphertext * @internal Could, but not must, extend by the child Crypt_* class */ function encrypt($plaintext) @@ -970,8 +970,8 @@ class Crypt_Base * * @see Crypt_Base::encrypt() * @access public - * @param String $ciphertext - * @return String $plaintext + * @param string $ciphertext + * @return string $plaintext * @internal Could, but not must, extend by the child Crypt_* class */ function decrypt($ciphertext) @@ -1261,10 +1261,10 @@ class Crypt_Base * * @see Crypt_Base::encrypt() * @see Crypt_Base::decrypt() - * @param String $plaintext - * @param String $encryptIV - * @param Array $buffer - * @return String + * @param string $plaintext + * @param string $encryptIV + * @param array $buffer + * @return string * @access private */ function _openssl_ctr_process($plaintext, &$encryptIV, &$buffer) @@ -1355,10 +1355,10 @@ class Crypt_Base * * @see Crypt_Base::encrypt() * @see Crypt_Base::decrypt() - * @param String $plaintext - * @param String $encryptIV - * @param Array $buffer - * @return String + * @param string $plaintext + * @param string $encryptIV + * @param array $buffer + * @return string * @access private */ function _openssl_ofb_process($plaintext, &$encryptIV, &$buffer) @@ -1404,7 +1404,7 @@ class Crypt_Base * * May need to be overwritten by classes extending this one in some cases * - * @return Integer + * @return int * @access private */ function _openssl_translate_mode() @@ -1531,9 +1531,9 @@ class Crypt_Base * Test for engine validity * * @see Crypt_Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -1598,7 +1598,7 @@ class Crypt_Base * If the preferred crypt engine is not available the fastest available one will be used * * @see Crypt_Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public */ function setPreferredEngine($engine) @@ -1673,8 +1673,8 @@ class Crypt_Base * Encrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string * @internal Must be extended by the child Crypt_* class */ function _encryptBlock($in) @@ -1686,8 +1686,8 @@ class Crypt_Base * Decrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string * @internal Must be extended by the child Crypt_* class */ function _decryptBlock($in) @@ -1809,9 +1809,9 @@ class Crypt_Base * and padding will, hence forth, be enabled. * * @see Crypt_Base::_unpad() - * @param String $text + * @param string $text * @access private - * @return String + * @return string */ function _pad($text) { @@ -1838,9 +1838,9 @@ class Crypt_Base * and false will be returned. * * @see Crypt_Base::_pad() - * @param String $text + * @param string $text * @access private - * @return String + * @return string */ function _unpad($text) { @@ -1881,10 +1881,10 @@ class Crypt_Base * * Inspired by array_shift * - * @param String $string - * @param Integer $index + * @param string $string + * @param int $index * @access private - * @return String + * @return string */ function _string_shift(&$string, $index = 1) { @@ -1898,10 +1898,10 @@ class Crypt_Base * * Inspired by array_pop * - * @param String $string - * @param Integer $index + * @param string $string + * @param int $index * @access private - * @return String + * @return string */ function _string_pop(&$string, $index = 1) { @@ -1915,7 +1915,7 @@ class Crypt_Base * * @see Crypt_Base::decrypt() * @see Crypt_Base::encrypt() - * @param String $var + * @param string $var * @access private */ function _increment_str(&$var) @@ -2125,9 +2125,9 @@ class Crypt_Base * @see Crypt_Base::_setupInlineCrypt() * @see Crypt_Base::encrypt() * @see Crypt_Base::decrypt() - * @param Array $cipher_code + * @param array $cipher_code * @access private - * @return String (the name of the created callback function) + * @return string (the name of the created callback function) */ function _createInlineCryptFunction($cipher_code) { @@ -2494,7 +2494,7 @@ class Crypt_Base * for which $mode the lambda function was created. * * @access private - * @return Array &$functions + * @return array &$functions */ function &_getLambdaFunctions() { @@ -2508,7 +2508,7 @@ class Crypt_Base * @see _setupInlineCrypt() * @access private * @param $bytes - * @return String + * @return string */ function _hashInlineCryptFunction($bytes) { diff --git a/phpseclib/Crypt/Blowfish.php b/phpseclib/Crypt/Blowfish.php index fed80892..5e53a54b 100644 --- a/phpseclib/Crypt/Blowfish.php +++ b/phpseclib/Crypt/Blowfish.php @@ -115,7 +115,7 @@ class Crypt_Blowfish extends Crypt_Base * Block Length of the cipher * * @see Crypt_Base::block_size - * @var Integer + * @var int * @access private */ var $block_size = 8; @@ -125,7 +125,7 @@ class Crypt_Blowfish extends Crypt_Base * * @see Crypt_Base::password_key_size * @see Crypt_Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 56; @@ -134,7 +134,7 @@ class Crypt_Blowfish extends Crypt_Base * The namespace used by the cipher for its constants. * * @see Crypt_Base::const_namespace - * @var String + * @var string * @access private */ var $const_namespace = 'BLOWFISH'; @@ -143,7 +143,7 @@ class Crypt_Blowfish extends Crypt_Base * The mcrypt specific name of the cipher * * @see Crypt_Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'blowfish'; @@ -152,7 +152,7 @@ class Crypt_Blowfish extends Crypt_Base * Optimizing value while CFB-encrypting * * @see Crypt_Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 500; @@ -348,7 +348,7 @@ class Crypt_Blowfish extends Crypt_Base /** * Holds the last used key * - * @var Array + * @var array * @access private */ var $kl; @@ -366,7 +366,7 @@ class Crypt_Blowfish extends Crypt_Base * * @access public * @see Crypt_Base::setKey() - * @param String $key + * @param string $key */ function setKey($key) { @@ -387,9 +387,9 @@ class Crypt_Blowfish extends Crypt_Base * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * * @see Crypt_Base::isValidEngine() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -464,8 +464,8 @@ class Crypt_Blowfish extends Crypt_Base * Encrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -500,8 +500,8 @@ class Crypt_Blowfish extends Crypt_Base * Decrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { diff --git a/phpseclib/Crypt/DES.php b/phpseclib/Crypt/DES.php index 18e1ee82..8ac1fe6b 100644 --- a/phpseclib/Crypt/DES.php +++ b/phpseclib/Crypt/DES.php @@ -134,7 +134,7 @@ class Crypt_DES extends Crypt_Base * Block Length of the cipher * * @see Crypt_Base::block_size - * @var Integer + * @var int * @access private */ var $block_size = 8; @@ -144,7 +144,7 @@ class Crypt_DES extends Crypt_Base * * @see Crypt_Base::key * @see setKey() - * @var String + * @var string * @access private */ var $key = "\0\0\0\0\0\0\0\0"; @@ -154,7 +154,7 @@ class Crypt_DES extends Crypt_Base * * @see Crypt_Base::password_key_size * @see Crypt_Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 8; @@ -163,7 +163,7 @@ class Crypt_DES extends Crypt_Base * The namespace used by the cipher for its constants. * * @see Crypt_Base::const_namespace - * @var String + * @var string * @access private */ var $const_namespace = 'DES'; @@ -172,7 +172,7 @@ class Crypt_DES extends Crypt_Base * The mcrypt specific name of the cipher * * @see Crypt_Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'des'; @@ -181,7 +181,7 @@ class Crypt_DES extends Crypt_Base * The OpenSSL names of the cipher / modes * * @see Crypt_Base::openssl_mode_names - * @var Array + * @var array * @access private */ var $openssl_mode_names = array( @@ -196,7 +196,7 @@ class Crypt_DES extends Crypt_Base * Optimizing value while CFB-encrypting * * @see Crypt_Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 500; @@ -208,7 +208,7 @@ class Crypt_DES extends Crypt_Base * * @see Crypt_DES::_setupKey() * @see Crypt_DES::_processBlock() - * @var Integer + * @var int * @access private */ var $des_rounds = 1; @@ -217,7 +217,7 @@ class Crypt_DES extends Crypt_Base * max possible size of $key * * @see Crypt_DES::setKey() - * @var String + * @var string * @access private */ var $key_size_max = 8; @@ -226,7 +226,7 @@ class Crypt_DES extends Crypt_Base * The Key Schedule * * @see Crypt_DES::_setupKey() - * @var Array + * @var array * @access private */ var $keys; @@ -240,7 +240,7 @@ class Crypt_DES extends Crypt_Base * * @see Crypt_DES::_processBlock() * @see Crypt_DES::_setupKey() - * @var Array + * @var array * @access private */ var $shuffle = array( @@ -379,7 +379,7 @@ class Crypt_DES extends Crypt_Base * * Indexing this table with each source byte performs the initial bit permutation. * - * @var Array + * @var array * @access private */ var $ipmap = array( @@ -421,7 +421,7 @@ class Crypt_DES extends Crypt_Base * Inverse IP mapping helper table. * Indexing this table with a byte value reverses the bit order. * - * @var Array + * @var array * @access private */ var $invipmap = array( @@ -465,7 +465,7 @@ class Crypt_DES extends Crypt_Base * Each box ($sbox1-$sbox8) has been vectorized, then each value pre-permuted using the * P table: concatenation can then be replaced by exclusive ORs. * - * @var Array + * @var array * @access private */ var $sbox1 = array( @@ -490,7 +490,7 @@ class Crypt_DES extends Crypt_Base /** * Pre-permuted S-box2 * - * @var Array + * @var array * @access private */ var $sbox2 = array( @@ -515,7 +515,7 @@ class Crypt_DES extends Crypt_Base /** * Pre-permuted S-box3 * - * @var Array + * @var array * @access private */ var $sbox3 = array( @@ -540,7 +540,7 @@ class Crypt_DES extends Crypt_Base /** * Pre-permuted S-box4 * - * @var Array + * @var array * @access private */ var $sbox4 = array( @@ -565,7 +565,7 @@ class Crypt_DES extends Crypt_Base /** * Pre-permuted S-box5 * - * @var Array + * @var array * @access private */ var $sbox5 = array( @@ -590,7 +590,7 @@ class Crypt_DES extends Crypt_Base /** * Pre-permuted S-box6 * - * @var Array + * @var array * @access private */ var $sbox6 = array( @@ -615,7 +615,7 @@ class Crypt_DES extends Crypt_Base /** * Pre-permuted S-box7 * - * @var Array + * @var array * @access private */ var $sbox7 = array( @@ -640,7 +640,7 @@ class Crypt_DES extends Crypt_Base /** * Pre-permuted S-box8 * - * @var Array + * @var array * @access private */ var $sbox8 = array( @@ -668,9 +668,9 @@ class Crypt_DES extends Crypt_Base * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * * @see Crypt_Base::isValidEngine() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -697,7 +697,7 @@ class Crypt_DES extends Crypt_Base * * @see Crypt_Base::setKey() * @access public - * @param String $key + * @param string $key */ function setKey($key) { @@ -718,8 +718,8 @@ class Crypt_DES extends Crypt_Base * @see Crypt_Base::encrypt() * @see Crypt_DES::encrypt() * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -733,8 +733,8 @@ class Crypt_DES extends Crypt_Base * @see Crypt_Base::decrypt() * @see Crypt_DES::decrypt() * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { @@ -751,9 +751,9 @@ class Crypt_DES extends Crypt_Base * @see Crypt_DES::_encryptBlock() * @see Crypt_DES::_decryptBlock() * @access private - * @param String $block - * @param Integer $mode - * @return String + * @param string $block + * @param int $mode + * @return string */ function _processBlock($block, $mode) { diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index 8ba693ed..bc8719ec 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -85,7 +85,7 @@ class Crypt_Hash * Hash Parameter * * @see Crypt_Hash::setHash() - * @var Integer + * @var int * @access private */ var $hashParam; @@ -94,7 +94,7 @@ class Crypt_Hash * Byte-length of compression blocks / key (Internal HMAC) * * @see Crypt_Hash::setAlgorithm() - * @var Integer + * @var int * @access private */ var $b; @@ -103,7 +103,7 @@ class Crypt_Hash * Byte-length of hash output (Internal HMAC) * * @see Crypt_Hash::setHash() - * @var Integer + * @var int * @access private */ var $l = false; @@ -112,7 +112,7 @@ class Crypt_Hash * Hash Algorithm * * @see Crypt_Hash::setHash() - * @var String + * @var string * @access private */ var $hash; @@ -121,7 +121,7 @@ class Crypt_Hash * Key * * @see Crypt_Hash::setKey() - * @var String + * @var string * @access private */ var $key = false; @@ -130,7 +130,7 @@ class Crypt_Hash * Outer XOR (Internal HMAC) * * @see Crypt_Hash::setKey() - * @var String + * @var string * @access private */ var $opad; @@ -139,7 +139,7 @@ class Crypt_Hash * Inner XOR (Internal HMAC) * * @see Crypt_Hash::setKey() - * @var String + * @var string * @access private */ var $ipad; @@ -147,7 +147,7 @@ class Crypt_Hash /** * Default Constructor. * - * @param String $hash + * @param string $hash * @return Crypt_Hash * @access public */ @@ -175,7 +175,7 @@ class Crypt_Hash * Keys can be of any length. * * @access public - * @param String $key + * @param string $key */ function setKey($key = false) { @@ -188,7 +188,7 @@ class Crypt_Hash * As set by the constructor or by the setHash() method. * * @access public - * @return String + * @return string */ function getHash() { @@ -199,7 +199,7 @@ class Crypt_Hash * Sets the hash function. * * @access public - * @param String $hash + * @param string $hash */ function setHash($hash) { @@ -306,8 +306,8 @@ class Crypt_Hash * Compute the HMAC. * * @access public - * @param String $text - * @return String + * @param string $text + * @return string */ function hash($text) { @@ -356,7 +356,7 @@ class Crypt_Hash * Returns the hash length (in bytes) * * @access public - * @return Integer + * @return int */ function getLength() { @@ -367,7 +367,7 @@ class Crypt_Hash * Wrapper for MD5 * * @access private - * @param String $m + * @param string $m */ function _md5($m) { @@ -378,7 +378,7 @@ class Crypt_Hash * Wrapper for SHA1 * * @access private - * @param String $m + * @param string $m */ function _sha1($m) { @@ -391,7 +391,7 @@ class Crypt_Hash * See {@link http://tools.ietf.org/html/rfc1319 RFC1319}. * * @access private - * @param String $m + * @param string $m */ function _md2($m) { @@ -467,7 +467,7 @@ class Crypt_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}. * * @access private - * @param String $m + * @param string $m */ function _sha256($m) { @@ -574,7 +574,7 @@ class Crypt_Hash * Pure-PHP implementation of SHA384 and SHA512 * * @access private - * @param String $m + * @param string $m */ function _sha512($m) { @@ -757,10 +757,10 @@ class Crypt_Hash * Right Rotate * * @access private - * @param Integer $int - * @param Integer $amt + * @param int $int + * @param int $amt * @see _sha256() - * @return Integer + * @return int */ function _rightRotate($int, $amt) { @@ -773,10 +773,10 @@ class Crypt_Hash * Right Shift * * @access private - * @param Integer $int - * @param Integer $amt + * @param int $int + * @param int $amt * @see _sha256() - * @return Integer + * @return int */ function _rightShift($int, $amt) { @@ -788,9 +788,9 @@ class Crypt_Hash * Not * * @access private - * @param Integer $int + * @param int $int * @see _sha256() - * @return Integer + * @return int */ function _not($int) { @@ -803,8 +803,8 @@ class Crypt_Hash * _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. Math_BigInteger() could be used but this should be faster. * - * @param Integer $... - * @return Integer + * @param int $... + * @return int * @see _sha256() * @access private */ @@ -829,9 +829,9 @@ class Crypt_Hash * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) diff --git a/phpseclib/Crypt/RC2.php b/phpseclib/Crypt/RC2.php index 8cad81dc..e170d9b1 100644 --- a/phpseclib/Crypt/RC2.php +++ b/phpseclib/Crypt/RC2.php @@ -111,7 +111,7 @@ class Crypt_RC2 extends Crypt_Base * Block Length of the cipher * * @see Crypt_Base::block_size - * @var Integer + * @var int * @access private */ var $block_size = 8; @@ -121,7 +121,7 @@ class Crypt_RC2 extends Crypt_Base * * @see Crypt_Base::key * @see setKey() - * @var String + * @var string * @access private */ var $key; @@ -133,7 +133,7 @@ class Crypt_RC2 extends Crypt_Base * @see setKey() * @see encrypt() * @see decrypt() - * @var String + * @var string * @access private */ var $orig_key; @@ -143,7 +143,7 @@ class Crypt_RC2 extends Crypt_Base * * @see Crypt_Base::password_key_size * @see Crypt_Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 16; // = 128 bits @@ -152,7 +152,7 @@ class Crypt_RC2 extends Crypt_Base * The namespace used by the cipher for its constants. * * @see Crypt_Base::const_namespace - * @var String + * @var string * @access private */ var $const_namespace = 'RC2'; @@ -161,7 +161,7 @@ class Crypt_RC2 extends Crypt_Base * The mcrypt specific name of the cipher * * @see Crypt_Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'rc2'; @@ -170,7 +170,7 @@ class Crypt_RC2 extends Crypt_Base * Optimizing value while CFB-encrypting * * @see Crypt_Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 500; @@ -180,7 +180,7 @@ class Crypt_RC2 extends Crypt_Base * * @see Crypt_RC2::setKeyLength() * @see Crypt_RC2::setKey() - * @var Integer + * @var int * @access private * @internal Should be in range [1..1024]. * @internal Changing this value after setting the key has no effect. @@ -192,7 +192,7 @@ class Crypt_RC2 extends Crypt_Base * * @see Crypt_RC2::isValidEnine() * @see Crypt_RC2::setKey() - * @var Integer + * @var int * @access private * @internal Should be in range [1..1024]. */ @@ -202,7 +202,7 @@ class Crypt_RC2 extends Crypt_Base * The Key Schedule * * @see Crypt_RC2::_setupKey() - * @var Array + * @var array * @access private */ var $keys; @@ -212,7 +212,7 @@ class Crypt_RC2 extends Crypt_Base * Twice the same 256-value sequence to save a modulus in key expansion. * * @see Crypt_RC2::setKey() - * @var Array + * @var array * @access private */ var $pitable = array( @@ -286,7 +286,7 @@ class Crypt_RC2 extends Crypt_Base * Inverse key expansion randomization table. * * @see Crypt_RC2::setKey() - * @var Array + * @var array * @access private */ var $invpitable = array( @@ -344,7 +344,7 @@ class Crypt_RC2 extends Crypt_Base * If not explicitly set, CRYPT_RC2_MODE_CBC will be used. * * @see Crypt_Base::Crypt_Base() - * @param Integer $mode + * @param int $mode * @access public */ function Crypt_RC2($mode = CRYPT_RC2_MODE_CBC) @@ -358,9 +358,9 @@ class Crypt_RC2 extends Crypt_Base * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * * @see Crypt_Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -384,7 +384,7 @@ class Crypt_RC2 extends Crypt_Base * Crypt_RC2::setKey() call. * * @access public - * @param Integer $length in bits + * @param int $length in bits */ function setKeyLength($length) { @@ -406,8 +406,8 @@ class Crypt_RC2 extends Crypt_Base * * @see Crypt_Base::setKey() * @access public - * @param String $key - * @param Integer $t1 optional Effective key length in bits. + * @param string $key + * @param int $t1 optional Effective key length in bits. */ function setKey($key, $t1 = 0) { @@ -458,8 +458,8 @@ class Crypt_RC2 extends Crypt_Base * * @see decrypt() * @access public - * @param String $plaintext - * @return String $ciphertext + * @param string $plaintext + * @return string $ciphertext */ function encrypt($plaintext) { @@ -481,8 +481,8 @@ class Crypt_RC2 extends Crypt_Base * * @see encrypt() * @access public - * @param String $ciphertext - * @return String $plaintext + * @param string $ciphertext + * @return string $plaintext */ function decrypt($ciphertext) { @@ -503,8 +503,8 @@ class Crypt_RC2 extends Crypt_Base * @see Crypt_Base::_encryptBlock() * @see Crypt_Base::encrypt() * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -548,8 +548,8 @@ class Crypt_RC2 extends Crypt_Base * @see Crypt_Base::_decryptBlock() * @see Crypt_Base::decrypt() * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { diff --git a/phpseclib/Crypt/RC4.php b/phpseclib/Crypt/RC4.php index 07827e99..8f21cff0 100644 --- a/phpseclib/Crypt/RC4.php +++ b/phpseclib/Crypt/RC4.php @@ -93,7 +93,7 @@ class Crypt_RC4 extends Crypt_Base * so we the block_size to 0 * * @see Crypt_Base::block_size - * @var Integer + * @var int * @access private */ var $block_size = 0; @@ -103,7 +103,7 @@ class Crypt_RC4 extends Crypt_Base * * @see Crypt_Base::password_key_size * @see Crypt_Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 128; // = 1024 bits @@ -112,7 +112,7 @@ class Crypt_RC4 extends Crypt_Base * The namespace used by the cipher for its constants. * * @see Crypt_Base::const_namespace - * @var String + * @var string * @access private */ var $const_namespace = 'RC4'; @@ -121,7 +121,7 @@ class Crypt_RC4 extends Crypt_Base * The mcrypt specific name of the cipher * * @see Crypt_Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'arcfour'; @@ -139,7 +139,7 @@ class Crypt_RC4 extends Crypt_Base * The Key * * @see Crypt_RC4::setKey() - * @var String + * @var string * @access private */ var $key = "\0"; @@ -148,7 +148,7 @@ class Crypt_RC4 extends Crypt_Base * The Key Stream for decryption and encryption * * @see Crypt_RC4::setKey() - * @var Array + * @var array * @access private */ var $stream; @@ -173,9 +173,9 @@ class Crypt_RC4 extends Crypt_Base * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * * @see Crypt_Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -214,7 +214,7 @@ class Crypt_RC4 extends Crypt_Base * {@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} * - * @param String $iv + * @param string $iv * @see Crypt_RC4::setKey() * @access public */ @@ -230,7 +230,7 @@ class Crypt_RC4 extends Crypt_Base * * @access public * @see Crypt_Base::setKey() - * @param String $key + * @param string $key */ function setKey($key) { @@ -243,8 +243,8 @@ class Crypt_RC4 extends Crypt_Base * @see Crypt_Base::decrypt() * @see Crypt_RC4::_crypt() * @access public - * @param String $plaintext - * @return String $ciphertext + * @param string $plaintext + * @return string $ciphertext */ function encrypt($plaintext) { @@ -263,8 +263,8 @@ class Crypt_RC4 extends Crypt_Base * @see Crypt_Base::encrypt() * @see Crypt_RC4::_crypt() * @access public - * @param String $ciphertext - * @return String $plaintext + * @param string $ciphertext + * @return string $plaintext */ function decrypt($ciphertext) { @@ -308,9 +308,9 @@ class Crypt_RC4 extends Crypt_Base * @see Crypt_RC4::encrypt() * @see Crypt_RC4::decrypt() * @access private - * @param String $text - * @param Integer $mode - * @return String $text + * @param string $text + * @param int $mode + * @return string $text */ function _crypt($text, $mode) { diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 003ceba0..64a9d0c2 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -282,7 +282,7 @@ class Crypt_RSA /** * Precomputed Zero * - * @var Array + * @var array * @access private */ var $zero; @@ -290,7 +290,7 @@ class Crypt_RSA /** * Precomputed One * - * @var Array + * @var array * @access private */ var $one; @@ -298,7 +298,7 @@ class Crypt_RSA /** * Private Key Format * - * @var Integer + * @var int * @access private */ var $privateKeyFormat = CRYPT_RSA_PRIVATE_FORMAT_PKCS1; @@ -306,7 +306,7 @@ class Crypt_RSA /** * Public Key Format * - * @var Integer + * @var int * @access public */ var $publicKeyFormat = CRYPT_RSA_PUBLIC_FORMAT_PKCS8; @@ -338,7 +338,7 @@ class Crypt_RSA /** * Primes for Chinese Remainder Theorem (ie. p and q) * - * @var Array + * @var array * @access private */ var $primes; @@ -346,7 +346,7 @@ class Crypt_RSA /** * Exponents for Chinese Remainder Theorem (ie. dP and dQ) * - * @var Array + * @var array * @access private */ var $exponents; @@ -354,7 +354,7 @@ class Crypt_RSA /** * Coefficients for Chinese Remainder Theorem (ie. qInv) * - * @var Array + * @var array * @access private */ var $coefficients; @@ -362,7 +362,7 @@ class Crypt_RSA /** * Hash name * - * @var String + * @var string * @access private */ var $hashName; @@ -378,7 +378,7 @@ class Crypt_RSA /** * Length of hash function output * - * @var Integer + * @var int * @access private */ var $hLen; @@ -386,7 +386,7 @@ class Crypt_RSA /** * Length of salt * - * @var Integer + * @var int * @access private */ var $sLen; @@ -402,7 +402,7 @@ class Crypt_RSA /** * Length of MGF hash function output * - * @var Integer + * @var int * @access private */ var $mgfHLen; @@ -410,7 +410,7 @@ class Crypt_RSA /** * Encryption mode * - * @var Integer + * @var int * @access private */ var $encryptionMode = CRYPT_RSA_ENCRYPTION_OAEP; @@ -418,7 +418,7 @@ class Crypt_RSA /** * Signature mode * - * @var Integer + * @var int * @access private */ var $signatureMode = CRYPT_RSA_SIGNATURE_PSS; @@ -426,7 +426,7 @@ class Crypt_RSA /** * Public Exponent * - * @var Mixed + * @var mixed * @access private */ var $publicExponent = false; @@ -434,7 +434,7 @@ class Crypt_RSA /** * Password * - * @var String + * @var string * @access private */ var $password = false; @@ -446,7 +446,7 @@ class Crypt_RSA * because PHP's XML Parser functions work on PHP4 whereas PHP's DOM functions - although surperior - don't. * * @see Crypt_RSA::_start_element_handler() - * @var Array + * @var array * @access private */ var $components = array(); @@ -458,7 +458,7 @@ class Crypt_RSA * * @see Crypt_RSA::_character_handler() * @see Crypt_RSA::_stop_element_handler() - * @var Mixed + * @var mixed * @access private */ var $current; @@ -468,7 +468,7 @@ class Crypt_RSA * * Set to null to use system configuration file. * @see Crypt_RSA::createKey() - * @var Mixed + * @var mixed * @Access public */ var $configFile; @@ -476,7 +476,7 @@ class Crypt_RSA /** * Public key comment field. * - * @var String + * @var string * @access private */ var $comment = 'phpseclib-generated-key'; @@ -571,8 +571,8 @@ class Crypt_RSA * Will need to be passed back to Crypt_RSA::createKey() as the third parameter for further processing. * * @access public - * @param Integer $bits - * @param Integer $timeout + * @param int $bits + * @param int $timeout * @param Math_BigInteger $p */ function createKey($bits = 1024, $timeout = false, $partial = array()) @@ -752,8 +752,8 @@ class Crypt_RSA * * @access private * @see setPrivateKeyFormat() - * @param String $RSAPrivateKey - * @return String + * @param string $RSAPrivateKey + * @return string */ function _convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients) { @@ -993,8 +993,8 @@ class Crypt_RSA * * @access private * @see setPublicKeyFormat() - * @param String $RSAPrivateKey - * @return String + * @param string $RSAPrivateKey + * @return string */ function _convertPublicKey($n, $e) { @@ -1072,9 +1072,9 @@ class Crypt_RSA * @access private * @see _convertPublicKey() * @see _convertPrivateKey() - * @param String $key - * @param Integer $type - * @return Array + * @param string $key + * @param int $type + * @return array */ function _parseKey($key, $type) { @@ -1490,7 +1490,7 @@ class Crypt_RSA * More specifically, this returns the size of the modulo in bits. * * @access public - * @return Integer + * @return int */ function getSize() { @@ -1503,9 +1503,9 @@ class Crypt_RSA * Called by xml_set_element_handler() * * @access private - * @param Resource $parser - * @param String $name - * @param Array $attribs + * @param resource $parser + * @param string $name + * @param array $attribs */ function _start_element_handler($parser, $name, $attribs) { @@ -1544,8 +1544,8 @@ class Crypt_RSA * Called by xml_set_element_handler() * * @access private - * @param Resource $parser - * @param String $name + * @param resource $parser + * @param string $name */ function _stop_element_handler($parser, $name) { @@ -1561,8 +1561,8 @@ class Crypt_RSA * Called by xml_set_character_data_handler() * * @access private - * @param Resource $parser - * @param String $data + * @param resource $parser + * @param string $data */ function _data_handler($parser, $data) { @@ -1578,8 +1578,8 @@ class Crypt_RSA * Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed) * * @access public - * @param String $key - * @param Integer $type optional + * @param string $key + * @param int $type optional */ function loadKey($key, $type = false) { @@ -1696,7 +1696,7 @@ class Crypt_RSA * @see createKey() * @see loadKey() * @access public - * @param String $password + * @param string $password */ function setPassword($password = false) { @@ -1720,9 +1720,9 @@ class Crypt_RSA * * @see getPublicKey() * @access public - * @param String $key optional - * @param Integer $type optional - * @return Boolean + * @param string $key optional + * @param int $type optional + * @return bool */ function setPublicKey($key = false, $type = false) { @@ -1780,9 +1780,9 @@ class Crypt_RSA * * @see getPublicKey() * @access public - * @param String $key optional - * @param Integer $type optional - * @return Boolean + * @param string $key optional + * @param int $type optional + * @return bool */ function setPrivateKey($key = false, $type = false) { @@ -1811,8 +1811,8 @@ class Crypt_RSA * * @see getPublicKey() * @access public - * @param String $key - * @param Integer $type optional + * @param string $key + * @param int $type optional */ function getPublicKey($type = CRYPT_RSA_PUBLIC_FORMAT_PKCS8) { @@ -1835,7 +1835,7 @@ class Crypt_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) * * @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. */ public function getPublicKeyFingerprint($algorithm = 'md5') @@ -1869,8 +1869,8 @@ class Crypt_RSA * * @see getPublicKey() * @access public - * @param String $key - * @param Integer $type optional + * @param string $key + * @param int $type optional */ function getPrivateKey($type = CRYPT_RSA_PUBLIC_FORMAT_PKCS1) { @@ -1893,8 +1893,8 @@ class Crypt_RSA * * @see getPrivateKey() * @access private - * @param String $key - * @param Integer $type optional + * @param string $key + * @param int $type optional */ function _getPrivatePublicKey($mode = CRYPT_RSA_PUBLIC_FORMAT_PKCS8) { @@ -1940,8 +1940,8 @@ class Crypt_RSA * Generates the smallest and largest numbers requiring $bits bits * * @access private - * @param Integer $bits - * @return Array + * @param int $bits + * @return array */ function _generateMinMax($bits) { @@ -1969,8 +1969,8 @@ class Crypt_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. * * @access private - * @param String $string - * @return Integer + * @param string $string + * @return int */ function _decodeLength(&$string) { @@ -1990,8 +1990,8 @@ class Crypt_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. * * @access private - * @param Integer $length - * @return String + * @param int $length + * @return string */ function _encodeLength($length) { @@ -2008,9 +2008,9 @@ class Crypt_RSA * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) @@ -2025,7 +2025,7 @@ class Crypt_RSA * * @see createKey() * @access public - * @param Integer $format + * @param int $format */ function setPrivateKeyFormat($format) { @@ -2037,7 +2037,7 @@ class Crypt_RSA * * @see createKey() * @access public - * @param Integer $format + * @param int $format */ function setPublicKeyFormat($format) { @@ -2051,7 +2051,7 @@ class Crypt_RSA * decryption. If $hash isn't supported, sha1 is used. * * @access public - * @param String $hash + * @param string $hash */ function setHash($hash) { @@ -2080,7 +2080,7 @@ class Crypt_RSA * best if Hash and MGFHash are set to the same thing this is not a requirement. * * @access public - * @param String $hash + * @param string $hash */ function setMGFHash($hash) { @@ -2109,7 +2109,7 @@ class Crypt_RSA * of the hash function Hash) and 0. * * @access public - * @param Integer $format + * @param int $format */ function setSaltLength($sLen) { @@ -2123,8 +2123,8 @@ class Crypt_RSA * * @access private * @param Math_BigInteger $x - * @param Integer $xLen - * @return String + * @param int $xLen + * @return string */ function _i2osp($x, $xLen) { @@ -2142,7 +2142,7 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}. * * @access private - * @param String $x + * @param string $x * @return Math_BigInteger */ function _os2ip($x) @@ -2236,7 +2236,7 @@ class Crypt_RSA * @access private * @param Math_BigInteger $x * @param Math_BigInteger $r - * @param Integer $i + * @param int $i * @return Math_BigInteger */ function _blind($x, $r, $i) @@ -2261,9 +2261,9 @@ class Crypt_RSA * Thanks for the heads up singpolyma! * * @access private - * @param String $x - * @param String $y - * @return Boolean + * @param string $x + * @param string $y + * @return bool */ function _equals($x, $y) { @@ -2357,9 +2357,9 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#appendix-B.2.1 RFC3447#appendix-B.2.1}. * * @access private - * @param String $mgfSeed - * @param Integer $mgfLen - * @return String + * @param string $mgfSeed + * @param int $mgfLen + * @return string */ function _mgf1($mgfSeed, $maskLen) { @@ -2382,9 +2382,9 @@ class Crypt_RSA * {http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding OAES}. * * @access private - * @param String $m - * @param String $l - * @return String + * @param string $m + * @param string $l + * @return string */ function _rsaes_oaep_encrypt($m, $l = '') { @@ -2445,9 +2445,9 @@ class Crypt_RSA * this document. * * @access private - * @param String $c - * @param String $l - * @return String + * @param string $c + * @param string $l + * @return string */ function _rsaes_oaep_decrypt($c, $l = '') { @@ -2504,8 +2504,8 @@ class Crypt_RSA * Doesn't use padding and is not recommended. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ function _raw_encrypt($m) { @@ -2520,8 +2520,8 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-7.2.1 RFC3447#section-7.2.1}. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ function _rsaes_pkcs1_v1_5_encrypt($m) { @@ -2579,8 +2579,8 @@ class Crypt_RSA * not private key encrypted ciphertext's. * * @access private - * @param String $c - * @return String + * @param string $c + * @return string */ function _rsaes_pkcs1_v1_5_decrypt($c) { @@ -2628,8 +2628,8 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-9.1.1 RFC3447#section-9.1.1}. * * @access private - * @param String $m - * @param Integer $emBits + * @param string $m + * @param int $emBits */ function _emsa_pss_encode($m, $emBits) { @@ -2664,10 +2664,10 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-9.1.2 RFC3447#section-9.1.2}. * * @access private - * @param String $m - * @param String $em - * @param Integer $emBits - * @return String + * @param string $m + * @param string $em + * @param int $emBits + * @return string */ function _emsa_pss_verify($m, $em, $emBits) { @@ -2711,8 +2711,8 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-8.1.1 RFC3447#section-8.1.1}. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ function _rsassa_pss_sign($m) { @@ -2737,9 +2737,9 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-8.1.2 RFC3447#section-8.1.2}. * * @access private - * @param String $m - * @param String $s - * @return String + * @param string $m + * @param string $s + * @return string */ function _rsassa_pss_verify($m, $s) { @@ -2777,9 +2777,9 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-9.2 RFC3447#section-9.2}. * * @access private - * @param String $m - * @param Integer $emLen - * @return String + * @param string $m + * @param int $emLen + * @return string */ function _emsa_pkcs1_v1_5_encode($m, $emLen) { @@ -2829,8 +2829,8 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-8.2.1 RFC3447#section-8.2.1}. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ function _rsassa_pkcs1_v1_5_sign($m) { @@ -2859,8 +2859,8 @@ class Crypt_RSA * See {@link http://tools.ietf.org/html/rfc3447#section-8.2.2 RFC3447#section-8.2.2}. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ function _rsassa_pkcs1_v1_5_verify($m, $s) { @@ -2903,7 +2903,7 @@ class Crypt_RSA * Valid values include CRYPT_RSA_ENCRYPTION_OAEP and CRYPT_RSA_ENCRYPTION_PKCS1. * * @access public - * @param Integer $mode + * @param int $mode */ function setEncryptionMode($mode) { @@ -2916,7 +2916,7 @@ class Crypt_RSA * Valid values include CRYPT_RSA_SIGNATURE_PSS and CRYPT_RSA_SIGNATURE_PKCS1 * * @access public - * @param Integer $mode + * @param int $mode */ function setSignatureMode($mode) { @@ -2927,7 +2927,7 @@ class Crypt_RSA * Set public key comment. * * @access public - * @param String $comment + * @param string $comment */ function setComment($comment) { @@ -2938,7 +2938,7 @@ class Crypt_RSA * Get public key comment. * * @access public - * @return String + * @return string */ function getComment() { @@ -2954,8 +2954,8 @@ class Crypt_RSA * * @see decrypt() * @access public - * @param String $plaintext - * @return String + * @param string $plaintext + * @return string */ function encrypt($plaintext) { @@ -3000,8 +3000,8 @@ class Crypt_RSA * * @see encrypt() * @access public - * @param String $plaintext - * @return String + * @param string $plaintext + * @return string */ function decrypt($ciphertext) { @@ -3042,8 +3042,8 @@ class Crypt_RSA * * @see verify() * @access public - * @param String $message - * @return String + * @param string $message + * @return string */ function sign($message) { @@ -3065,9 +3065,9 @@ class Crypt_RSA * * @see sign() * @access public - * @param String $message - * @param String $signature - * @return Boolean + * @param string $message + * @param string $signature + * @return bool */ function verify($message, $signature) { @@ -3088,8 +3088,8 @@ class Crypt_RSA * Extract raw BER from Base64 encoding * * @access private - * @param String $str - * @return String + * @param string $str + * @return string */ function _extractBER($str) { diff --git a/phpseclib/Crypt/Random.php b/phpseclib/Crypt/Random.php index bb968374..73f048d9 100644 --- a/phpseclib/Crypt/Random.php +++ b/phpseclib/Crypt/Random.php @@ -61,8 +61,8 @@ if (!function_exists('crypt_random_string')) { * microoptimizations because this function has the potential of being called a huge number of times. * eg. for RSA key generation. * - * @param Integer $length - * @return String + * @param int $length + * @return string * @access public */ function crypt_random_string($length) diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index 08034b89..e2cf7f84 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -132,7 +132,7 @@ class Crypt_Rijndael extends Crypt_Base * * @see Crypt_Base::password_key_size * @see Crypt_Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 16; @@ -141,7 +141,7 @@ class Crypt_Rijndael extends Crypt_Base * The namespace used by the cipher for its constants. * * @see Crypt_Base::const_namespace - * @var String + * @var string * @access private */ var $const_namespace = 'RIJNDAEL'; @@ -157,7 +157,7 @@ class Crypt_Rijndael extends Crypt_Base * @see Crypt_Base::cipher_name_mcrypt * @see Crypt_Base::engine * @see isValidEngine() - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'rijndael-128'; @@ -167,7 +167,7 @@ class Crypt_Rijndael extends Crypt_Base * * @see Crypt_Base::password_default_salt * @see Crypt_Base::setPassword() - * @var String + * @var string * @access private */ var $password_default_salt = 'phpseclib'; @@ -176,7 +176,7 @@ class Crypt_Rijndael extends Crypt_Base * Has the key length explicitly been set or should it be derived from the key, itself? * * @see setKeyLength() - * @var Boolean + * @var bool * @access private */ var $explicit_key_length = false; @@ -185,7 +185,7 @@ class Crypt_Rijndael extends Crypt_Base * The Key Schedule * * @see _setup() - * @var Array + * @var array * @access private */ var $w; @@ -194,7 +194,7 @@ class Crypt_Rijndael extends Crypt_Base * The Inverse Key Schedule * * @see _setup() - * @var Array + * @var array * @access private */ var $dw; @@ -203,7 +203,7 @@ class Crypt_Rijndael extends Crypt_Base * The Block Length divided by 32 * * @see setBlockLength() - * @var Integer + * @var int * @access private * @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 @@ -216,7 +216,7 @@ class Crypt_Rijndael extends Crypt_Base * The Key Length * * @see setKeyLength() - * @var Integer + * @var int * @access private * @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 @@ -229,7 +229,7 @@ class Crypt_Rijndael extends Crypt_Base * The Key Length divided by 32 * * @see setKeyLength() - * @var Integer + * @var int * @access private * @internal The max value is 256 / 32 = 8, the min value is 128 / 32 = 4 */ @@ -238,7 +238,7 @@ class Crypt_Rijndael extends Crypt_Base /** * The Number of Rounds * - * @var Integer + * @var int * @access private * @internal The max value is 14, the min value is 10. */ @@ -247,7 +247,7 @@ class Crypt_Rijndael extends Crypt_Base /** * Shift offsets * - * @var Array + * @var array * @access private */ var $c; @@ -255,7 +255,7 @@ class Crypt_Rijndael extends Crypt_Base /** * Holds the last used key- and block_size information * - * @var Array + * @var array * @access private */ var $kl; @@ -280,7 +280,7 @@ class Crypt_Rijndael extends Crypt_Base * If not explictly set, CRYPT_RIJNDAEL_MODE_CBC will be used. * * @see Crypt_Base::Crypt_Base() - * @param Integer $mode + * @param int $mode * @access public */ function Crypt_Rijndael($mode = CRYPT_RIJNDAEL_MODE_CBC) @@ -303,7 +303,7 @@ class Crypt_Rijndael extends Crypt_Base * @see Crypt_Base:setKey() * @see setKeyLength() * @access public - * @param String $key + * @param string $key */ function setKey($key) { @@ -347,7 +347,7 @@ class Crypt_Rijndael extends Crypt_Base * This results then in slower encryption. * * @access public - * @param Integer $length + * @param int $length */ function setKeyLength($length) { @@ -380,7 +380,7 @@ class Crypt_Rijndael extends Crypt_Base * 128. If the length is greater than 128 and invalid, it will be rounded down to the closest valid amount. * * @access public - * @param Integer $length + * @param int $length */ function setBlockLength($length) { @@ -402,9 +402,9 @@ class Crypt_Rijndael extends Crypt_Base * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * * @see Crypt_Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -443,8 +443,8 @@ class Crypt_Rijndael extends Crypt_Base * Encrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -544,8 +544,8 @@ class Crypt_Rijndael extends Crypt_Base * Decrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { @@ -749,7 +749,7 @@ class Crypt_Rijndael extends Crypt_Base * Performs S-Box substitutions * * @access private - * @param Integer $word + * @param int $word */ function _subWord($word) { @@ -771,7 +771,7 @@ class Crypt_Rijndael extends Crypt_Base * @see Crypt_Rijndael:_setupInlineCrypt() * @see Crypt_Rijndael:_subWord() * @access private - * @return Array &$tables + * @return array &$tables */ function &_getTables() { @@ -860,7 +860,7 @@ class Crypt_Rijndael extends Crypt_Base * @see Crypt_Rijndael:_setupInlineCrypt() * @see Crypt_Rijndael:_setupKey() * @access private - * @return Array &$tables + * @return array &$tables */ function &_getInvTables() { diff --git a/phpseclib/Crypt/TripleDES.php b/phpseclib/Crypt/TripleDES.php index 67ac492d..99a0a5b7 100644 --- a/phpseclib/Crypt/TripleDES.php +++ b/phpseclib/Crypt/TripleDES.php @@ -100,7 +100,7 @@ class Crypt_TripleDES extends Crypt_DES * @see Crypt_DES::password_key_size * @see Crypt_Base::password_key_size * @see Crypt_Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 24; @@ -110,7 +110,7 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_Base::password_default_salt * @see Crypt_Base::setPassword() - * @var String + * @var string * @access private */ var $password_default_salt = 'phpseclib'; @@ -120,7 +120,7 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_DES::const_namespace * @see Crypt_Base::const_namespace - * @var String + * @var string * @access private */ var $const_namespace = 'DES'; @@ -130,7 +130,7 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_DES::cipher_name_mcrypt * @see Crypt_Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'tripledes'; @@ -139,7 +139,7 @@ class Crypt_TripleDES extends Crypt_DES * Optimizing value while CFB-encrypting * * @see Crypt_Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 750; @@ -149,7 +149,7 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_TripleDES::setKey() * @see Crypt_DES::setKey() - * @var String + * @var string * @access private */ var $key_size_max = 24; @@ -157,7 +157,7 @@ class Crypt_TripleDES extends Crypt_DES /** * Internal flag whether using CRYPT_DES_MODE_3CBC or not * - * @var Boolean + * @var bool * @access private */ var $mode_3cbc; @@ -167,7 +167,7 @@ class Crypt_TripleDES extends Crypt_DES * * Used only if $mode_3cbc === true * - * @var Array + * @var array * @access private */ var $des; @@ -195,7 +195,7 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_DES::Crypt_DES() * @see Crypt_Base::Crypt_Base() - * @param Integer $mode + * @param int $mode * @access public */ function Crypt_TripleDES($mode = CRYPT_MODE_CBC) @@ -231,9 +231,9 @@ class Crypt_TripleDES extends Crypt_DES * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * * @see Crypt_Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -254,7 +254,7 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_Base::setIV() * @access public - * @param String $iv + * @param string $iv */ function setIV($iv) { @@ -279,7 +279,7 @@ class Crypt_TripleDES extends Crypt_DES * @access public * @see Crypt_DES::setKey() * @see Crypt_Base::setKey() - * @param String $key + * @param string $key */ function setKey($key) { @@ -310,8 +310,8 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_Base::encrypt() * @access public - * @param String $plaintext - * @return String $cipertext + * @param string $plaintext + * @return string $cipertext */ function encrypt($plaintext) { @@ -337,8 +337,8 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_Base::decrypt() * @access public - * @param String $ciphertext - * @return String $plaintext + * @param string $ciphertext + * @return string $plaintext */ function decrypt($ciphertext) { @@ -464,9 +464,9 @@ class Crypt_TripleDES extends Crypt_DES * * @see Crypt_Base::Crypt_Base() * @see Crypt_Base::setPreferredEngine() - * @param Integer $engine + * @param int $engine * @access public - * @return Integer + * @return int */ function setPreferredEngine($engine) { diff --git a/phpseclib/Crypt/Twofish.php b/phpseclib/Crypt/Twofish.php index 191edae1..b7d76f01 100644 --- a/phpseclib/Crypt/Twofish.php +++ b/phpseclib/Crypt/Twofish.php @@ -115,7 +115,7 @@ class Crypt_Twofish extends Crypt_Base * The namespace used by the cipher for its constants. * * @see Crypt_Base::const_namespace - * @var String + * @var string * @access private */ var $const_namespace = 'TWOFISH'; @@ -124,7 +124,7 @@ class Crypt_Twofish extends Crypt_Base * The mcrypt specific name of the cipher * * @see Crypt_Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'twofish'; @@ -133,7 +133,7 @@ class Crypt_Twofish extends Crypt_Base * Optimizing value while CFB-encrypting * * @see Crypt_Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 800; @@ -141,7 +141,7 @@ class Crypt_Twofish extends Crypt_Base /** * Q-Table * - * @var Array + * @var array * @access private */ var $q0 = array ( @@ -182,7 +182,7 @@ class Crypt_Twofish extends Crypt_Base /** * Q-Table * - * @var Array + * @var array * @access private */ var $q1 = array ( @@ -223,7 +223,7 @@ class Crypt_Twofish extends Crypt_Base /** * M-Table * - * @var Array + * @var array * @access private */ var $m0 = array ( @@ -264,7 +264,7 @@ class Crypt_Twofish extends Crypt_Base /** * M-Table * - * @var Array + * @var array * @access private */ var $m1 = array ( @@ -305,7 +305,7 @@ class Crypt_Twofish extends Crypt_Base /** * M-Table * - * @var Array + * @var array * @access private */ var $m2 = array ( @@ -346,7 +346,7 @@ class Crypt_Twofish extends Crypt_Base /** * M-Table * - * @var Array + * @var array * @access private */ var $m3 = array ( @@ -387,7 +387,7 @@ class Crypt_Twofish extends Crypt_Base /** * The Key Schedule Array * - * @var Array + * @var array * @access private */ var $K = array(); @@ -395,7 +395,7 @@ class Crypt_Twofish extends Crypt_Base /** * The Key depended S-Table 0 * - * @var Array + * @var array * @access private */ var $S0 = array(); @@ -403,7 +403,7 @@ class Crypt_Twofish extends Crypt_Base /** * The Key depended S-Table 1 * - * @var Array + * @var array * @access private */ var $S1 = array(); @@ -411,7 +411,7 @@ class Crypt_Twofish extends Crypt_Base /** * The Key depended S-Table 2 * - * @var Array + * @var array * @access private */ var $S2 = array(); @@ -419,7 +419,7 @@ class Crypt_Twofish extends Crypt_Base /** * The Key depended S-Table 3 * - * @var Array + * @var array * @access private */ var $S3 = array(); @@ -427,7 +427,7 @@ class Crypt_Twofish extends Crypt_Base /** * Holds the last used key * - * @var Array + * @var array * @access private */ var $kl; @@ -443,7 +443,7 @@ class Crypt_Twofish extends Crypt_Base * * @access public * @see Crypt_Base::setKey() - * @param String $key + * @param string $key */ function setKey($key) { @@ -575,9 +575,9 @@ class Crypt_Twofish extends Crypt_Base * _mdsrem function using by the twofish cipher algorithm * * @access private - * @param String $A - * @param String $B - * @return Array + * @param string $A + * @param string $B + * @return array */ function _mdsrem($A, $B) { @@ -623,8 +623,8 @@ class Crypt_Twofish extends Crypt_Base * Encrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -679,8 +679,8 @@ class Crypt_Twofish extends Crypt_Base * Decrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { diff --git a/phpseclib/File/ANSI.php b/phpseclib/File/ANSI.php index fa75195e..95acf374 100644 --- a/phpseclib/File/ANSI.php +++ b/phpseclib/File/ANSI.php @@ -48,7 +48,7 @@ class File_ANSI /** * Max Width * - * @var Integer + * @var int * @access private */ var $max_x; @@ -56,7 +56,7 @@ class File_ANSI /** * Max Height * - * @var Integer + * @var int * @access private */ var $max_y; @@ -64,7 +64,7 @@ class File_ANSI /** * Max History * - * @var Integer + * @var int * @access private */ var $max_history; @@ -72,7 +72,7 @@ class File_ANSI /** * History * - * @var Array + * @var array * @access private */ var $history; @@ -80,7 +80,7 @@ class File_ANSI /** * History Attributes * - * @var Array + * @var array * @access private */ var $history_attrs; @@ -88,7 +88,7 @@ class File_ANSI /** * Current Column * - * @var Integer + * @var int * @access private */ var $x; @@ -96,7 +96,7 @@ class File_ANSI /** * Current Row * - * @var Integer + * @var int * @access private */ var $y; @@ -104,7 +104,7 @@ class File_ANSI /** * Old Column * - * @var Integer + * @var int * @access private */ var $old_x; @@ -112,7 +112,7 @@ class File_ANSI /** * Old Row * - * @var Integer + * @var int * @access private */ var $old_y; @@ -120,7 +120,7 @@ class File_ANSI /** * An empty attribute cell * - * @var Object + * @var object * @access private */ var $base_attr_cell; @@ -128,7 +128,7 @@ class File_ANSI /** * The current attribute cell * - * @var Object + * @var object * @access private */ var $attr_cell; @@ -136,7 +136,7 @@ class File_ANSI /** * An empty attribute row * - * @var Array + * @var array * @access private */ var $attr_row; @@ -144,7 +144,7 @@ class File_ANSI /** * The current screen text * - * @var Array + * @var array * @access private */ var $screen; @@ -152,7 +152,7 @@ class File_ANSI /** * The current screen attributes * - * @var Array + * @var array * @access private */ var $attrs; @@ -160,7 +160,7 @@ class File_ANSI /** * Current ANSI code * - * @var String + * @var string * @access private */ var $ansi; @@ -168,7 +168,7 @@ class File_ANSI /** * Tokenization * - * @var Array + * @var array * @access private */ var $tokenization; @@ -200,8 +200,8 @@ class File_ANSI * * Resets the screen as well * - * @param Integer $x - * @param Integer $y + * @param int $x + * @param int $y * @access public */ function setDimensions($x, $y) @@ -219,8 +219,8 @@ class File_ANSI /** * Set the number of lines that should be logged past the terminal height * - * @param Integer $x - * @param Integer $y + * @param int $x + * @param int $y * @access public */ function setHistory($history) @@ -231,7 +231,7 @@ class File_ANSI /** * Load a string * - * @param String $source + * @param string $source * @access public */ function loadString($source) @@ -243,7 +243,7 @@ class File_ANSI /** * Appdend a string * - * @param String $source + * @param string $source * @access public */ function appendString($source) @@ -474,7 +474,7 @@ class File_ANSI * Returns the current coordinate without preformating * * @access private - * @return String + * @return string */ function _processCoordinate($last_attr, $cur_attr, $char) { @@ -531,7 +531,7 @@ class File_ANSI * Returns the current screen without preformating * * @access private - * @return String + * @return string */ function _getScreen() { @@ -555,7 +555,7 @@ class File_ANSI * Returns the current screen * * @access public - * @return String + * @return string */ function getScreen() { @@ -566,7 +566,7 @@ class File_ANSI * Returns the current screen and the x previous lines * * @access public - * @return String + * @return string */ function getHistory() { diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 4eaf85ab..1b803f87 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -119,7 +119,7 @@ class File_ASN1_Element /** * Raw element value * - * @var String + * @var string * @access private */ var $element; @@ -127,7 +127,7 @@ class File_ASN1_Element /** * Constructor * - * @param String $encoded + * @param string $encoded * @return File_ASN1_Element * @access public */ @@ -149,7 +149,7 @@ class File_ASN1 /** * ASN.1 object identifier * - * @var Array + * @var array * @access private * @link http://en.wikipedia.org/wiki/Object_identifier */ @@ -158,7 +158,7 @@ class File_ASN1 /** * Default date format * - * @var String + * @var string * @access private * @link http://php.net/class.datetime */ @@ -167,7 +167,7 @@ class File_ASN1 /** * Default date format * - * @var Array + * @var array * @access private * @see File_ASN1::setTimeFormat() * @see File_ASN1::asn1map() @@ -180,7 +180,7 @@ class File_ASN1 * * If the mapping type is FILE_ASN1_TYPE_ANY what do we actually encode it as? * - * @var Array + * @var array * @access private * @see File_ASN1::_encode_der() */ @@ -193,7 +193,7 @@ class File_ASN1 * Unambiguous types get the direct mapping (int/real/bool). * Others are mapped as a choice, with an extra indexing level. * - * @var Array + * @var array * @access public */ var $ANYmap = array( @@ -227,7 +227,7 @@ class File_ASN1 * Non-convertable types are absent from this table. * size == 0 indicates variable length encoding. * - * @var Array + * @var array * @access public */ var $stringTypeSize = array( @@ -261,8 +261,8 @@ class File_ASN1 * * Serves a similar purpose to openssl's asn1parse * - * @param String $encoded - * @return Array + * @param string $encoded + * @return array * @access public */ function decodeBER($encoded) @@ -283,9 +283,9 @@ class File_ASN1 * $encoded is passed by reference for the recursive calls done for FILE_ASN1_TYPE_BIT_STRING and * FILE_ASN1_TYPE_OCTET_STRING. In those cases, the indefinite length is used. * - * @param String $encoded - * @param Integer $start - * @return Array + * @param string $encoded + * @param int $start + * @return array * @access private */ function _decode_ber($encoded, $start = 0) @@ -543,10 +543,10 @@ class File_ASN1 * * "Special" mappings may be applied on a per tag-name basis via $special. * - * @param Array $decoded - * @param Array $mapping - * @param Array $special - * @return Array + * @param array $decoded + * @param array $mapping + * @param array $special + * @return array * @access public */ function asn1map($decoded, $mapping, $special = array()) @@ -835,10 +835,10 @@ class File_ASN1 * * "Special" mappings can be applied via $special. * - * @param String $source - * @param String $mapping - * @param Integer $idx - * @return String + * @param string $source + * @param string $mapping + * @param int $idx + * @return string * @access public */ function encodeDER($source, $mapping, $special = array()) @@ -850,10 +850,10 @@ class File_ASN1 /** * ASN.1 Encode (Helper function) * - * @param String $source - * @param String $mapping - * @param Integer $idx - * @return String + * @param string $source + * @param string $mapping + * @param int $idx + * @return string * @access private */ function _encode_der($source, $mapping, $idx = null, $special = array()) @@ -1150,8 +1150,8 @@ class File_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. * * @access private - * @param Integer $length - * @return String + * @param int $length + * @return string */ function _encodeLength($length) { @@ -1169,9 +1169,9 @@ class File_ASN1 * Called by _decode_ber() and in the case of implicit tags asn1map(). * * @access private - * @param String $content - * @param Integer $tag - * @return String + * @param string $content + * @param int $tag + * @return string */ function _decodeTime($content, $tag) { @@ -1218,7 +1218,7 @@ class File_ASN1 * Sets the time / date format for asn1map(). * * @access public - * @param String $format + * @param string $format */ function setTimeFormat($format) { @@ -1231,7 +1231,7 @@ class File_ASN1 * Load the relevant OIDs for a particular ASN.1 semantic mapping. * * @access public - * @param Array $oids + * @param array $oids */ function loadOIDs($oids) { @@ -1244,7 +1244,7 @@ class File_ASN1 * See File_X509, etc, for an example. * * @access public - * @param Array $filters + * @param array $filters */ function loadFilters($filters) { @@ -1256,9 +1256,9 @@ class File_ASN1 * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) @@ -1274,10 +1274,10 @@ class File_ASN1 * This is a lazy conversion, dealing only with character size. * No real conversion table is used. * - * @param String $in - * @param Integer $from - * @param Integer $to - * @return String + * @param string $in + * @param int $from + * @param int $to + * @return string * @access public */ function convert($in, $from = FILE_ASN1_TYPE_UTF8_STRING, $to = FILE_ASN1_TYPE_UTF8_STRING) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 0869deb6..cc9e32b9 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -132,7 +132,7 @@ class File_X509 /** * ASN.1 syntax for X.509 certificates * - * @var Array + * @var array * @access private */ var $Certificate; @@ -181,7 +181,7 @@ class File_X509 /** * ASN.1 syntax for Certificate Signing Requests (RFC2986) * - * @var Array + * @var array * @access private */ var $CertificationRequest; @@ -189,7 +189,7 @@ class File_X509 /** * ASN.1 syntax for Certificate Revocation Lists (RFC5280) * - * @var Array + * @var array * @access private */ var $CertificateList; @@ -197,7 +197,7 @@ class File_X509 /** * Distinguished Name * - * @var Array + * @var array * @access private */ var $dn; @@ -205,7 +205,7 @@ class File_X509 /** * Public key * - * @var String + * @var string * @access private */ var $publicKey; @@ -213,7 +213,7 @@ class File_X509 /** * Private key * - * @var String + * @var string * @access private */ var $privateKey; @@ -221,7 +221,7 @@ class File_X509 /** * Object identifiers for X.509 certificates * - * @var Array + * @var array * @access private * @link http://en.wikipedia.org/wiki/Object_identifier */ @@ -230,7 +230,7 @@ class File_X509 /** * The certificate authorities * - * @var Array + * @var array * @access private */ var $CAs; @@ -238,7 +238,7 @@ class File_X509 /** * The currently loaded certificate * - * @var Array + * @var array * @access private */ var $currentCert; @@ -249,7 +249,7 @@ class File_X509 * There's no guarantee 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. * - * @var String + * @var string * @access private */ var $signatureSubject; @@ -257,7 +257,7 @@ class File_X509 /** * Certificate Start Date * - * @var String + * @var string * @access private */ var $startDate; @@ -265,7 +265,7 @@ class File_X509 /** * Certificate End Date * - * @var String + * @var string * @access private */ var $endDate; @@ -273,7 +273,7 @@ class File_X509 /** * Serial Number * - * @var String + * @var string * @access private */ var $serialNumber; @@ -284,7 +284,7 @@ class File_X509 * 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}. * - * @var String + * @var string * @access private */ var $currentKeyIdentifier; @@ -292,7 +292,7 @@ class File_X509 /** * CA Flag * - * @var Boolean + * @var bool * @access private */ var $caFlag = false; @@ -300,7 +300,7 @@ class File_X509 /** * SPKAC Challenge * - * @var String + * @var string * @access private */ var $challenge; @@ -1422,9 +1422,9 @@ class File_X509 * * 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 - * @return Mixed + * @return mixed */ function loadX509($cert) { @@ -1484,10 +1484,10 @@ class File_X509 /** * Save X.509 certificate * - * @param Array $cert - * @param Integer $format optional + * @param array $cert + * @param int $format optional * @access public - * @return String + * @return string */ function saveX509($cert, $format = FILE_X509_FORMAT_PEM) { @@ -1560,9 +1560,9 @@ class File_X509 * Map extension values from octet string to extension-specific internal * format. * - * @param Array ref $root - * @param String $path - * @param Object $asn1 + * @param array ref $root + * @param string $path + * @param object $asn1 * @access private */ function _mapInExtensions(&$root, $path, $asn1) @@ -1610,9 +1610,9 @@ class File_X509 * Map extension values from extension-specific internal format to * octet string. * - * @param Array ref $root - * @param String $path - * @param Object $asn1 + * @param array ref $root + * @param string $path + * @param object $asn1 * @access private */ function _mapOutExtensions(&$root, $path, $asn1) @@ -1676,9 +1676,9 @@ class File_X509 * Map attribute values from ANY type to attribute-specific internal * format. * - * @param Array ref $root - * @param String $path - * @param Object $asn1 + * @param array ref $root + * @param string $path + * @param object $asn1 * @access private */ function _mapInAttributes(&$root, $path, $asn1) @@ -1717,9 +1717,9 @@ class File_X509 * Map attribute values from attribute-specific internal format to * ANY type. * - * @param Array ref $root - * @param String $path - * @param Object $asn1 + * @param array ref $root + * @param string $path + * @param object $asn1 * @access private */ function _mapOutAttributes(&$root, $path, $asn1) @@ -1759,9 +1759,9 @@ class File_X509 /** * Associate an extension ID to an extension mapping * - * @param String $extnId + * @param string $extnId * @access private - * @return Mixed + * @return mixed */ function _getMapping($extnId) { @@ -1855,9 +1855,9 @@ class File_X509 /** * Load an X.509 certificate as a certificate authority * - * @param String $cert + * @param string $cert * @access public - * @return Boolean + * @return bool */ function loadCA($cert) { @@ -1922,9 +1922,9 @@ class File_X509 * 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. * - * @param String $url + * @param string $url * @access public - * @return Boolean + * @return bool */ function validateURL($url) { @@ -1980,7 +1980,7 @@ class File_X509 * * If $date isn't defined it is assumed to be the current date. * - * @param Integer $date optional + * @param int $date optional * @access public */ function validateDate($date = null) @@ -2019,9 +2019,9 @@ class File_X509 * * 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 - * @return Mixed + * @return mixed */ function validateSignature($caonly = true) { @@ -2129,13 +2129,13 @@ class File_X509 * * Returns true if the signature is verified, false if it is not correct or null on error * - * @param String $publicKeyAlgorithm - * @param String $publicKey - * @param String $signatureAlgorithm - * @param String $signature - * @param String $signatureSubject + * @param string $publicKeyAlgorithm + * @param string $publicKey + * @param string $signatureAlgorithm + * @param string $signature + * @param string $signatureSubject * @access private - * @return Integer + * @return int */ function _validateSignature($publicKeyAlgorithm, $publicKey, $signatureAlgorithm, $signature, $signatureSubject) { @@ -2177,10 +2177,10 @@ class File_X509 * * Reformats a public key to a format supported by phpseclib (if applicable) * - * @param String $algorithm - * @param String $key + * @param string $algorithm + * @param string $key * @access private - * @return String + * @return string */ function _reformatKey($algorithm, $key) { @@ -2203,9 +2203,9 @@ class File_X509 * * Takes in a base64 encoded "blob" and returns a human readable IP address * - * @param String $ip + * @param string $ip * @access private - * @return String + * @return string */ function _decodeIP($ip) { @@ -2219,9 +2219,9 @@ class File_X509 * * Takes a human readable IP address into a base64-encoded "blob" * - * @param String $ip + * @param string $ip * @access private - * @return String + * @return string */ function _encodeIP($ip) { @@ -2231,9 +2231,9 @@ class File_X509 /** * "Normalizes" a Distinguished Name property * - * @param String $propName + * @param string $propName * @access private - * @return Mixed + * @return mixed */ function _translateDNProp($propName) { @@ -2320,11 +2320,11 @@ class File_X509 /** * Set a Distinguished Name property * - * @param String $propName - * @param Mixed $propValue - * @param String $type optional + * @param string $propName + * @param mixed $propValue + * @param string $type optional * @access public - * @return Boolean + * @return bool */ function setDNProp($propName, $propValue, $type = 'utf8String') { @@ -2354,7 +2354,7 @@ class File_X509 /** * Remove Distinguished Name properties * - * @param String $propName + * @param string $propName * @access public */ function removeDNProp($propName) @@ -2381,10 +2381,10 @@ class File_X509 /** * Get Distinguished Name properties * - * @param String $propName - * @param Array $dn optional - * @param Boolean $withType optional - * @return Mixed + * @param string $propName + * @param array $dn optional + * @param bool $withType optional + * @return mixed * @access public */ function getDNProp($propName, $dn = null, $withType = false) @@ -2432,11 +2432,11 @@ class File_X509 /** * Set a Distinguished Name * - * @param Mixed $dn - * @param Boolean $merge optional - * @param String $type optional + * @param mixed $dn + * @param bool $merge optional + * @param string $type optional * @access public - * @return Boolean + * @return bool */ function setDN($dn, $merge = false, $type = 'utf8String') { @@ -2475,10 +2475,10 @@ class File_X509 /** * Get the Distinguished Name for a certificates subject * - * @param Mixed $format optional - * @param Array $dn optional + * @param mixed $format optional + * @param array $dn optional * @access public - * @return Boolean + * @return bool */ function getDN($format = FILE_X509_DN_ARRAY, $dn = null) { @@ -2621,9 +2621,9 @@ class File_X509 /** * Get the Distinguished Name for a certificate/crl issuer * - * @param Integer $format optional + * @param int $format optional * @access public - * @return Mixed + * @return mixed */ function getIssuerDN($format = FILE_X509_DN_ARRAY) { @@ -2643,9 +2643,9 @@ class File_X509 * Get the Distinguished Name for a certificate/csr subject * Alias of getDN() * - * @param Integer $format optional + * @param int $format optional * @access public - * @return Mixed + * @return mixed */ function getSubjectDN($format = FILE_X509_DN_ARRAY) { @@ -2666,10 +2666,10 @@ class File_X509 /** * Get an individual Distinguished Name property for a certificate/crl issuer * - * @param String $propName - * @param Boolean $withType optional + * @param string $propName + * @param bool $withType optional * @access public - * @return Mixed + * @return mixed */ function getIssuerDNProp($propName, $withType = false) { @@ -2688,10 +2688,10 @@ class File_X509 /** * Get an individual Distinguished Name property for a certificate/csr subject * - * @param String $propName - * @param Boolean $withType optional + * @param string $propName + * @param bool $withType optional * @access public - * @return Mixed + * @return mixed */ function getSubjectDNProp($propName, $withType = false) { @@ -2713,7 +2713,7 @@ class File_X509 * Get the certificate chain for the current cert * * @access public - * @return Mixed + * @return mixed */ function getChain() { @@ -2759,9 +2759,9 @@ class File_X509 * * Key needs to be a Crypt_RSA object * - * @param Object $key + * @param object $key * @access public - * @return Boolean + * @return bool */ function setPublicKey($key) { @@ -2774,7 +2774,7 @@ class File_X509 * * Key needs to be a Crypt_RSA object * - * @param Object $key + * @param object $key * @access public */ function setPrivateKey($key) @@ -2787,7 +2787,7 @@ class File_X509 * * Used for SPKAC CSR's * - * @param String $challenge + * @param string $challenge * @access public */ function setChallenge($challenge) @@ -2801,7 +2801,7 @@ class File_X509 * Returns a Crypt_RSA object or a false. * * @access public - * @return Mixed + * @return mixed */ function getPublicKey() { @@ -2842,9 +2842,9 @@ class File_X509 /** * Load a Certificate Signing Request * - * @param String $csr + * @param string $csr * @access public - * @return Mixed + * @return mixed */ function loadCSR($csr) { @@ -2918,10 +2918,10 @@ class File_X509 /** * Save CSR request * - * @param Array $csr - * @param Integer $format optional + * @param array $csr + * @param int $format optional * @access public - * @return String + * @return string */ function saveCSR($csr, $format = FILE_X509_FORMAT_PEM) { @@ -2970,9 +2970,9 @@ class File_X509 * * https://developer.mozilla.org/en-US/docs/HTML/Element/keygen * - * @param String $csr + * @param string $csr * @access public - * @return Mixed + * @return mixed */ function loadSPKAC($spkac) { @@ -3044,10 +3044,10 @@ class File_X509 /** * Save a SPKAC CSR request * - * @param Array $csr - * @param Integer $format optional + * @param array $csr + * @param int $format optional * @access public - * @return String + * @return string */ function saveSPKAC($spkac, $format = FILE_X509_FORMAT_PEM) { @@ -3087,9 +3087,9 @@ class File_X509 /** * Load a Certificate Revocation List * - * @param String $crl + * @param string $crl * @access public - * @return Mixed + * @return mixed */ function loadCRL($crl) { @@ -3142,10 +3142,10 @@ class File_X509 /** * Save Certificate Revocation List. * - * @param Array $crl - * @param Integer $format optional + * @param array $crl + * @param int $format optional * @access public - * @return String + * @return string */ function saveCRL($crl, $format = FILE_X509_FORMAT_PEM) { @@ -3204,9 +3204,9 @@ class File_X509 * - 5.1.2.6 Revoked Certificates * 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 - * @return Array + * @return array */ function _timeField($date) { @@ -3227,9 +3227,9 @@ class File_X509 * * @param File_X509 $issuer * @param File_X509 $subject - * @param String $signatureAlgorithm optional + * @param string $signatureAlgorithm optional * @access public - * @return Mixed + * @return mixed */ function sign($issuer, $subject, $signatureAlgorithm = 'sha1WithRSAEncryption') { @@ -3411,7 +3411,7 @@ class File_X509 * Sign a CSR * * @access public - * @return Mixed + * @return mixed */ function signCSR($signatureAlgorithm = 'sha1WithRSAEncryption') { @@ -3469,7 +3469,7 @@ class File_X509 * Sign a SPKAC * * @access public - * @return Mixed + * @return mixed */ function signSPKAC($signatureAlgorithm = 'sha1WithRSAEncryption') { @@ -3537,9 +3537,9 @@ class File_X509 * * @param File_X509 $issuer * @param File_X509 $crl - * @param String $signatureAlgorithm optional + * @param string $signatureAlgorithm optional * @access public - * @return Mixed + * @return mixed */ function signCRL($issuer, $crl, $signatureAlgorithm = 'sha1WithRSAEncryption') { @@ -3664,11 +3664,11 @@ class File_X509 /** * X.509 certificate signing helper function. * - * @param Object $key + * @param object $key * @param File_X509 $subject - * @param String $signatureAlgorithm + * @param string $signatureAlgorithm * @access public - * @return Mixed + * @return mixed */ function _sign($key, $signatureAlgorithm) { @@ -3696,7 +3696,7 @@ class File_X509 /** * Set certificate start date * - * @param String $date + * @param string $date * @access public */ function setStartDate($date) @@ -3707,7 +3707,7 @@ class File_X509 /** * Set certificate end date * - * @param String $date + * @param string $date * @access public */ function setEndDate($date) @@ -3732,7 +3732,7 @@ class File_X509 /** * Set Serial Number * - * @param String $serial + * @param string $serial * @param $base optional * @access public */ @@ -3755,8 +3755,8 @@ class File_X509 * Get a reference to a subarray * * @param array $root - * @param String $path absolute path with / as component separator - * @param Boolean $create optional + * @param string $path absolute path with / as component separator + * @param bool $create optional * @access private * @return array item ref or false */ @@ -3791,8 +3791,8 @@ class File_X509 * Get a reference to an extension subarray * * @param array $root - * @param String $path optional absolute path with / as component separator - * @param Boolean $create optional + * @param string $path optional absolute path with / as component separator + * @param bool $create optional * @access private * @return array ref or false */ @@ -3845,10 +3845,10 @@ class File_X509 /** * Remove an Extension * - * @param String $id - * @param String $path optional + * @param string $id + * @param string $path optional * @access private - * @return Boolean + * @return bool */ function _removeExtension($id, $path = null) { @@ -3875,11 +3875,11 @@ class File_X509 * * Returns the extension if it exists and false if not * - * @param String $id - * @param Array $cert optional - * @param String $path optional + * @param string $id + * @param array $cert optional + * @param string $path optional * @access private - * @return Mixed + * @return mixed */ function _getExtension($id, $cert = null, $path = null) { @@ -3902,9 +3902,9 @@ class File_X509 * Returns a list of all extensions in use * * @param array $cert optional - * @param String $path optional + * @param string $path optional * @access private - * @return Array + * @return array */ function _getExtensions($cert = null, $path = null) { @@ -3923,13 +3923,13 @@ class File_X509 /** * Set an Extension * - * @param String $id - * @param Mixed $value - * @param Boolean $critical optional - * @param Boolean $replace optional - * @param String $path optional + * @param string $id + * @param mixed $value + * @param bool $critical optional + * @param bool $replace optional + * @param string $path optional * @access private - * @return Boolean + * @return bool */ function _setExtension($id, $value, $critical = false, $replace = true, $path = null) { @@ -3959,9 +3959,9 @@ class File_X509 /** * Remove a certificate, CSR or CRL Extension * - * @param String $id + * @param string $id * @access public - * @return Boolean + * @return bool */ function removeExtension($id) { @@ -3973,10 +3973,10 @@ class File_X509 * * Returns the extension if it exists and false if not * - * @param String $id - * @param Array $cert optional + * @param string $id + * @param array $cert optional * @access public - * @return Mixed + * @return mixed */ function getExtension($id, $cert = null) { @@ -3988,7 +3988,7 @@ class File_X509 * * @param array $cert optional * @access public - * @return Array + * @return array */ function getExtensions($cert = null) { @@ -3998,12 +3998,12 @@ class File_X509 /** * Set a certificate, CSR or CRL Extension * - * @param String $id - * @param Mixed $value - * @param Boolean $critical optional - * @param Boolean $replace optional + * @param string $id + * @param mixed $value + * @param bool $critical optional + * @param bool $replace optional * @access public - * @return Boolean + * @return bool */ function setExtension($id, $value, $critical = false, $replace = true) { @@ -4013,10 +4013,10 @@ class File_X509 /** * Remove a CSR attribute. * - * @param String $id - * @param Integer $disposition optional + * @param string $id + * @param int $disposition optional * @access public - * @return Boolean + * @return bool */ function removeAttribute($id, $disposition = FILE_X509_ATTR_ALL) { @@ -4063,11 +4063,11 @@ class File_X509 * * Returns the attribute if it exists and false if not * - * @param String $id - * @param Integer $disposition optional - * @param Array $csr optional + * @param string $id + * @param int $disposition optional + * @param array $csr optional * @access public - * @return Mixed + * @return mixed */ function getAttribute($id, $disposition = FILE_X509_ATTR_ALL, $csr = null) { @@ -4107,7 +4107,7 @@ class File_X509 * * @param array $csr optional * @access public - * @return Array + * @return array */ function getAttributes($csr = null) { @@ -4130,11 +4130,11 @@ class File_X509 /** * Set a CSR attribute * - * @param String $id - * @param Mixed $value - * @param Boolean $disposition optional + * @param string $id + * @param mixed $value + * @param bool $disposition optional * @access public - * @return Boolean + * @return bool */ function setAttribute($id, $value, $disposition = FILE_X509_ATTR_ALL) { @@ -4188,7 +4188,7 @@ class File_X509 * * This is used by the id-ce-authorityKeyIdentifier and the id-ce-subjectKeyIdentifier extensions. * - * @param String $value + * @param string $value * @access public */ function setKeyIdentifier($value) @@ -4213,10 +4213,10 @@ class File_X509 * - File_ASN1_Element object * - PEM or DER string * - * @param Mixed $key optional - * @param Integer $method optional + * @param mixed $key optional + * @param int $method optional * @access public - * @return String binary key identifier + * @return string binary key identifier */ function computeKeyIdentifier($key = null, $method = 1) { @@ -4296,7 +4296,7 @@ class File_X509 * Format a public key as appropriate * * @access private - * @return Array + * @return array */ function _formatSubjectPublicKey() { @@ -4322,7 +4322,7 @@ class File_X509 * Set the domain name's which the cert is to be valid for * * @access public - * @return Array + * @return array */ function setDomain() { @@ -4335,7 +4335,7 @@ class File_X509 * Set the IP Addresses's which the cert is to be valid for * * @access public - * @param String $ipAddress optional + * @param string $ipAddress optional */ function setIPAddress() { @@ -4352,8 +4352,8 @@ class File_X509 * Helper function to build domain array * * @access private - * @param String $domain - * @return Array + * @param string $domain + * @return array */ function _dnsName($domain) { @@ -4366,8 +4366,8 @@ class File_X509 * (IPv6 is not currently supported) * * @access private - * @param String $address - * @return Array + * @param string $address + * @return array */ function _iPAddress($address) { @@ -4378,10 +4378,10 @@ class File_X509 * Get the index of a revoked certificate. * * @param array $rclist - * @param String $serial - * @param Boolean $create optional + * @param string $serial + * @param bool $create optional * @access private - * @return Integer or false + * @return int or false */ function _revokedCertificate(&$rclist, $serial, $create = false) { @@ -4406,10 +4406,10 @@ class File_X509 /** * Revoke a certificate. * - * @param String $serial - * @param String $date optional + * @param string $serial + * @param string $date optional * @access public - * @return Boolean + * @return bool */ function revoke($serial, $date = null) { @@ -4433,9 +4433,9 @@ class File_X509 /** * Unrevoke a certificate. * - * @param String $serial + * @param string $serial * @access public - * @return Boolean + * @return bool */ function unrevoke($serial) { @@ -4453,9 +4453,9 @@ class File_X509 /** * Get a revoked certificate. * - * @param String $serial + * @param string $serial * @access public - * @return Mixed + * @return mixed */ function getRevoked($serial) { @@ -4499,10 +4499,10 @@ class File_X509 /** * Remove a Revoked Certificate Extension * - * @param String $serial - * @param String $id + * @param string $serial + * @param string $id * @access public - * @return Boolean + * @return bool */ function removeRevokedCertificateExtension($serial, $id) { @@ -4520,11 +4520,11 @@ class File_X509 * * Returns the extension if it exists and false if not * - * @param String $serial - * @param String $id - * @param Array $crl optional + * @param string $serial + * @param string $id + * @param array $crl optional * @access public - * @return Mixed + * @return mixed */ function getRevokedCertificateExtension($serial, $id, $crl = null) { @@ -4544,10 +4544,10 @@ class File_X509 /** * Returns a list of all extensions in use for a given revoked certificate * - * @param String $serial + * @param string $serial * @param array $crl optional * @access public - * @return Array + * @return array */ function getRevokedCertificateExtensions($serial, $crl = null) { @@ -4567,13 +4567,13 @@ class File_X509 /** * Set a Revoked Certificate Extension * - * @param String $serial - * @param String $id - * @param Mixed $value - * @param Boolean $critical optional - * @param Boolean $replace optional + * @param string $serial + * @param string $id + * @param mixed $value + * @param bool $critical optional + * @param bool $replace optional * @access public - * @return Boolean + * @return bool */ function setRevokedCertificateExtension($serial, $id, $value, $critical = false, $replace = true) { @@ -4592,8 +4592,8 @@ class File_X509 * Extract raw BER from Base64 encoding * * @access private - * @param String $str - * @return String + * @param string $str + * @return string */ function _extractBER($str) { diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 799829e3..2f13dca7 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -178,7 +178,7 @@ class Math_BigInteger /** * Holds the BigInteger's value. * - * @var Array + * @var array * @access private */ var $value; @@ -186,7 +186,7 @@ class Math_BigInteger /** * Holds the BigInteger's magnitude. * - * @var Boolean + * @var bool * @access private */ var $is_negative = false; @@ -224,7 +224,7 @@ class Math_BigInteger * * @see __sleep() * @see __wakeup() - * @var String + * @var string * @access private */ var $hex; @@ -247,7 +247,7 @@ class Math_BigInteger * * * @param $x base-10 number or base-$base number if $base set. - * @param integer $base + * @param int $base * @return Math_BigInteger * @access public */ @@ -524,8 +524,8 @@ class Math_BigInteger * ?> * * - * @param Boolean $twos_compliment - * @return String + * @param bool $twos_compliment + * @return string * @access public * @internal Converts a base-2**26 number to base-2**8 */ @@ -621,8 +621,8 @@ class Math_BigInteger * ?> * * - * @param Boolean $twos_compliment - * @return String + * @param bool $twos_compliment + * @return string * @access public * @internal Converts a base-2**26 number to base-2**8 */ @@ -648,8 +648,8 @@ class Math_BigInteger * ?> * * - * @param Boolean $twos_compliment - * @return String + * @param bool $twos_compliment + * @return string * @access public * @internal Converts a base-2**26 number to base-2**2 */ @@ -686,7 +686,7 @@ class Math_BigInteger * ?> * * - * @return String + * @return string * @access public * @internal Converts a base-2**26 number to base-10**7 (which is pretty much base-10) */ @@ -874,11 +874,11 @@ class Math_BigInteger /** * Performs addition. * - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @return Array + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @return array * @access private */ function _add($x_value, $x_negative, $y_value, $y_negative) @@ -1005,11 +1005,11 @@ class Math_BigInteger /** * Performs subtraction. * - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @return Array + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @return array * @access private */ function _subtract($x_value, $x_negative, $y_value, $y_negative) @@ -1140,11 +1140,11 @@ class Math_BigInteger /** * Performs multiplication. * - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @return Array + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @return array * @access private */ function _multiply($x_value, $x_negative, $y_value, $y_negative) @@ -1179,9 +1179,9 @@ class Math_BigInteger * * Modeled after 'multiply' in MutableBigInteger.java. * - * @param Array $x_value - * @param Array $y_value - * @return Array + * @param array $x_value + * @param array $y_value + * @return array * @access private */ function _regularMultiply($x_value, $y_value) @@ -1243,9 +1243,9 @@ class Math_BigInteger * 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}. * - * @param Array $x_value - * @param Array $y_value - * @return Array + * @param array $x_value + * @param array $y_value + * @return array * @access private */ function _karatsuba($x_value, $y_value) @@ -1282,8 +1282,8 @@ class Math_BigInteger /** * Performs squaring * - * @param Array $x - * @return Array + * @param array $x + * @return array * @access private */ function _square($x = false) @@ -1300,8 +1300,8 @@ class Math_BigInteger * {@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. * - * @param Array $value - * @return Array + * @param array $value + * @return array * @access private */ function _baseSquare($value) @@ -1339,8 +1339,8 @@ class Math_BigInteger * 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}. * - * @param Array $value - * @return Array + * @param array $value + * @return array * @access private */ function _karatsubaSquare($value) @@ -1396,7 +1396,7 @@ class Math_BigInteger * * * @param Math_BigInteger $y - * @return Array + * @return array * @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}. */ @@ -1576,9 +1576,9 @@ class Math_BigInteger * * abc / x = a00 / x + b0 / x + c / x * - * @param Array $dividend - * @param Array $divisor - * @return Array + * @param array $dividend + * @param array $divisor + * @return array * @access private */ function _divide_digit($dividend, $divisor) @@ -1803,7 +1803,7 @@ class Math_BigInteger * * @param Math_BigInteger $e * @param Math_BigInteger $n - * @param Integer $mode + * @param int $mode * @return Math_BigInteger * @access private */ @@ -1878,10 +1878,10 @@ class Math_BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @param Integer $mode - * @return Array + * @param array $x + * @param array $n + * @param int $mode + * @return array */ function _reduce($x, $n, $mode) { @@ -1915,10 +1915,10 @@ class Math_BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @param Integer $mode - * @return Array + * @param array $x + * @param array $n + * @param int $mode + * @return array */ function _prepareReduce($x, $n, $mode) { @@ -1933,11 +1933,11 @@ class Math_BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $y - * @param Array $n - * @param Integer $mode - * @return Array + * @param array $x + * @param array $y + * @param array $n + * @param int $mode + * @return array */ function _multiplyReduce($x, $y, $n, $mode) { @@ -1953,10 +1953,10 @@ class Math_BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @param Integer $mode - * @return Array + * @param array $x + * @param array $n + * @param int $mode + * @return array */ function _squareReduce($x, $n, $mode) { @@ -2004,9 +2004,9 @@ class Math_BigInteger * * @see _slidingWindow() * @access private - * @param Array $n - * @param Array $m - * @return Array + * @param array $n + * @param array $m + * @return array */ function _barrett($n, $m) { @@ -2101,9 +2101,9 @@ class Math_BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @return Array + * @param array $x + * @param array $n + * @return array */ function _regularBarrett($x, $n) { @@ -2171,12 +2171,12 @@ class Math_BigInteger * If you're going to be doing array_slice($product->value, 0, $stop), some cycles can be saved. * * @see _regularBarrett() - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @param Integer $stop - * @return Array + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @param int $stop + * @return array * @access private */ function _multiplyLower($x_value, $x_negative, $y_value, $y_negative, $stop) @@ -2254,9 +2254,9 @@ class Math_BigInteger * @see _prepMontgomery() * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @return Array + * @param array $x + * @param array $n + * @return array */ function _montgomery($x, $n) { @@ -2301,10 +2301,10 @@ class Math_BigInteger * @see _prepMontgomery() * @see _montgomery() * @access private - * @param Array $x - * @param Array $y - * @param Array $m - * @return Array + * @param array $x + * @param array $y + * @param array $m + * @return array */ function _montgomeryMultiply($x, $y, $m) { @@ -2353,9 +2353,9 @@ class Math_BigInteger * @see _montgomery() * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @return Array + * @param array $x + * @param array $n + * @return array */ function _prepMontgomery($x, $n) { @@ -2391,8 +2391,8 @@ class Math_BigInteger * * @see _montgomery() * @access private - * @param Array $x - * @return Integer + * @param array $x + * @return int */ function _modInverse67108864($x) // 2**26 == 67,108,864 { @@ -2674,7 +2674,7 @@ class Math_BigInteger * Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y). * * @param 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 * @see equals() * @internal Could return $this->subtract($x), but that's not as fast as what we do do. @@ -2694,11 +2694,11 @@ class Math_BigInteger /** * Compares two numbers. * - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @return Integer + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @return int * @see compare() * @access private */ @@ -2733,7 +2733,7 @@ class Math_BigInteger * If you need to see if one number is greater than or less than another number, use Math_BigInteger::compare() * * @param Math_BigInteger $x - * @return Boolean + * @return bool * @access public * @see compare() */ @@ -2753,7 +2753,7 @@ class Math_BigInteger * Some bitwise operations give different results depending on the precision being used. Examples include left * shift, not, and rotates. * - * @param Integer $bits + * @param int $bits * @access public */ function setPrecision($bits) @@ -2931,7 +2931,7 @@ class Math_BigInteger * * Shifts BigInteger's by $shift bits, effectively dividing by 2**$shift. * - * @param Integer $shift + * @param int $shift * @return Math_BigInteger * @access public * @internal The only version that yields any speed increases is the internal version. @@ -2969,7 +2969,7 @@ class Math_BigInteger * * Shifts BigInteger's by $shift bits, effectively multiplying by 2**$shift. * - * @param Integer $shift + * @param int $shift * @return Math_BigInteger * @access public * @internal The only version that yields any speed increases is the internal version. @@ -3007,7 +3007,7 @@ class Math_BigInteger * * Instead of the top x bits being dropped they're appended to the shifted bit string. * - * @param Integer $shift + * @param int $shift * @return Math_BigInteger * @access public */ @@ -3052,7 +3052,7 @@ class Math_BigInteger * * Instead of the bottom x bits being dropped they're prepended to the shifted bit string. * - * @param Integer $shift + * @param int $shift * @return Math_BigInteger * @access public */ @@ -3066,7 +3066,7 @@ class Math_BigInteger * * This function is deprecated. * - * @param String $generator + * @param string $generator * @access public */ function setRandomGenerator($generator) @@ -3078,7 +3078,7 @@ class Math_BigInteger * * Byte length is equal to $length. Uses crypt_random if it's loaded and mt_rand if it's not. * - * @param Integer $length + * @param int $length * @return Math_BigInteger * @access private */ @@ -3195,8 +3195,8 @@ class Math_BigInteger * * @param Math_BigInteger $arg1 * @param Math_BigInteger $arg2 - * @param Integer $timeout - * @return Mixed + * @param int $timeout + * @return mixed * @access public * @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap4.pdf#page=15 HAC 4.44}. */ @@ -3324,7 +3324,7 @@ class Math_BigInteger * on a website instead of just one. * * @param Math_BigInteger $t - * @return Boolean + * @return bool * @access public * @internal Uses the * {@link http://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test Miller-Rabin primality test}. See @@ -3476,7 +3476,7 @@ class Math_BigInteger * * Shifts BigInteger's by $shift bits. * - * @param Integer $shift + * @param int $shift * @access private */ function _lshift($shift) @@ -3511,7 +3511,7 @@ class Math_BigInteger * * Shifts BigInteger's by $shift bits. * - * @param Integer $shift + * @param int $shift * @access private */ function _rshift($shift) @@ -3595,7 +3595,7 @@ class Math_BigInteger * * Removes leading zeros * - * @param Array $value + * @param array $value * @return Math_BigInteger * @access private */ @@ -3616,7 +3616,7 @@ class Math_BigInteger * * @param $input Array * @param $multiplier mixed - * @return Array + * @return array * @access private */ function _array_repeat($input, $multiplier) @@ -3631,7 +3631,7 @@ class Math_BigInteger * * @param $x String * @param $shift Integer - * @return String + * @return string * @access private */ function _base256_lshift(&$x, $shift) @@ -3660,7 +3660,7 @@ class Math_BigInteger * * @param $x String * @param $shift Integer - * @return String + * @return string * @access private */ function _base256_rshift(&$x, $shift) @@ -3700,8 +3700,8 @@ class Math_BigInteger /** * Converts 32-bit integers to bytes. * - * @param Integer $x - * @return String + * @param int $x + * @return string * @access private */ function _int2bytes($x) @@ -3712,8 +3712,8 @@ class Math_BigInteger /** * Converts bytes to 32-bit integers * - * @param String $x - * @return Integer + * @param string $x + * @return int * @access private */ function _bytes2int($x) @@ -3729,8 +3729,8 @@ class Math_BigInteger * * @see modPow() * @access private - * @param Integer $length - * @return String + * @param int $length + * @return string */ function _encodeASN1Length($length) { @@ -3751,9 +3751,9 @@ class Math_BigInteger * we'll guarantee that the dividend is divisible by first subtracting the remainder. * * @access private - * @param Integer $x - * @param Integer $y - * @return Integer + * @param int $x + * @param int $y + * @return int */ function _safe_divide($x, $y) { diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index 1bdffb97..d7d4c5f7 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -90,7 +90,7 @@ class Net_SCP /** * SSH Object * - * @var Object + * @var object * @access private */ var $ssh; @@ -98,7 +98,7 @@ class Net_SCP /** * Packet Size * - * @var Integer + * @var int * @access private */ var $packet_size; @@ -106,7 +106,7 @@ class Net_SCP /** * Mode * - * @var Integer + * @var int * @access private */ var $mode; @@ -116,9 +116,9 @@ class Net_SCP * * Connects to an SSH server * - * @param String $host - * @param Integer $port - * @param Integer $timeout + * @param string $host + * @param int $port + * @param int $timeout * @return Net_SCP * @access public */ @@ -157,11 +157,11 @@ class Net_SCP * 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. * - * @param String $remote_file - * @param String $data - * @param Integer $mode - * @param Callable $callback - * @return Boolean + * @param string $remote_file + * @param string $data + * @param int $mode + * @param callable $callback + * @return bool * @access public */ function put($remote_file, $data, $mode = NET_SCP_STRING, $callback = null) @@ -233,9 +233,9 @@ class Net_SCP * the operation was unsuccessful. If $local_file is defined, returns true or false depending on the success of the * operation * - * @param String $remote_file - * @param String $local_file - * @return Mixed + * @param string $remote_file + * @param string $local_file + * @return mixed * @access public */ function get($remote_file, $local_file = false) @@ -291,7 +291,7 @@ class Net_SCP /** * Sends a packet to an SSH server * - * @param String $data + * @param string $data * @access private */ function _send($data) @@ -309,7 +309,7 @@ class Net_SCP /** * Receives a packet from an SSH server * - * @return String + * @return string * @access private */ function _receive() diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 6f93ec04..934ca44e 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -130,7 +130,7 @@ class Net_SFTP extends Net_SSH2 * Packet Types * * @see Net_SFTP::Net_SFTP() - * @var Array + * @var array * @access private */ var $packet_types = array(); @@ -139,7 +139,7 @@ class Net_SFTP extends Net_SSH2 * Status Codes * * @see Net_SFTP::Net_SFTP() - * @var Array + * @var array * @access private */ var $status_codes = array(); @@ -150,7 +150,7 @@ class Net_SFTP extends Net_SSH2 * 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. * - * @var Integer + * @var int * @see Net_SFTP::_send_sftp_packet() * @access private */ @@ -162,7 +162,7 @@ class Net_SFTP extends Net_SSH2 * 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. * - * @var Integer + * @var int * @see Net_SFTP::_get_sftp_packet() * @access private */ @@ -171,7 +171,7 @@ class Net_SFTP extends Net_SSH2 /** * Packet Buffer * - * @var String + * @var string * @see Net_SFTP::_get_sftp_packet() * @access private */ @@ -180,7 +180,7 @@ class Net_SFTP extends Net_SSH2 /** * Extensions supported by the server * - * @var Array + * @var array * @see Net_SFTP::_initChannel() * @access private */ @@ -189,7 +189,7 @@ class Net_SFTP extends Net_SSH2 /** * Server SFTP version * - * @var Integer + * @var int * @see Net_SFTP::_initChannel() * @access private */ @@ -198,7 +198,7 @@ class Net_SFTP extends Net_SSH2 /** * Current working directory * - * @var String + * @var string * @see Net_SFTP::_realpath() * @see Net_SFTP::chdir() * @access private @@ -209,7 +209,7 @@ class Net_SFTP extends Net_SSH2 * Packet Type Log * * @see Net_SFTP::getLog() - * @var Array + * @var array * @access private */ var $packet_type_log = array(); @@ -218,7 +218,7 @@ class Net_SFTP extends Net_SSH2 * Packet Log * * @see Net_SFTP::getLog() - * @var Array + * @var array * @access private */ var $packet_log = array(); @@ -228,7 +228,7 @@ class Net_SFTP extends Net_SSH2 * * @see Net_SFTP::getSFTPErrors() * @see Net_SFTP::getLastSFTPError() - * @var String + * @var string * @access private */ var $sftp_errors = array(); @@ -242,7 +242,7 @@ class Net_SFTP extends Net_SSH2 * @see Net_SFTP::_update_stat_cache() * @see Net_SFTP::_remove_from_stat_cache() * @see Net_SFTP::_query_stat_cache() - * @var Array + * @var array * @access private */ var $stat_cache = array(); @@ -252,7 +252,7 @@ class Net_SFTP extends Net_SSH2 * * @see Net_SFTP::Net_SFTP() * @see Net_SFTP::get() - * @var Array + * @var array * @access private */ var $max_sftp_packet; @@ -262,7 +262,7 @@ class Net_SFTP extends Net_SSH2 * * @see Net_SFTP::disableStatCache() * @see Net_SFTP::enableStatCache() - * @var Boolean + * @var bool * @access private */ var $use_stat_cache = true; @@ -272,7 +272,7 @@ class Net_SFTP extends Net_SSH2 * * @see Net_SFTP::_comparator() * @see Net_SFTP::setListOrder() - * @var Array + * @var array * @access private */ var $sortOptions = array(); @@ -282,9 +282,9 @@ class Net_SFTP extends Net_SSH2 * * Connects to an SFTP server * - * @param String $host - * @param Integer $port - * @param Integer $timeout + * @param string $host + * @param int $port + * @param int $timeout * @return Net_SFTP * @access public */ @@ -420,9 +420,9 @@ class Net_SFTP extends Net_SSH2 /** * Login * - * @param String $username - * @param String $password - * @return Boolean + * @param string $username + * @param string $password + * @return bool * @access public */ function login($username) @@ -610,7 +610,7 @@ class Net_SFTP extends Net_SSH2 /** * Returns the current directory name * - * @return Mixed + * @return mixed * @access public */ function pwd() @@ -621,8 +621,8 @@ class Net_SFTP extends Net_SSH2 /** * Logs errors * - * @param String $response - * @param Integer $status + * @param string $response + * @param int $status * @access public */ function _logError($response, $status = -1) @@ -648,8 +648,8 @@ class Net_SFTP extends Net_SSH2 * the absolute (canonicalized) path. * * @see Net_SFTP::chdir() - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access private */ function _realpath($path) @@ -704,8 +704,8 @@ class Net_SFTP extends Net_SSH2 /** * Changes the current directory * - * @param String $dir - * @return Boolean + * @param string $dir + * @return bool * @access public */ function chdir($dir) @@ -766,9 +766,9 @@ class Net_SFTP extends Net_SSH2 /** * Returns a list of files in the given directory * - * @param String $dir - * @param Boolean $recursive - * @return Mixed + * @param string $dir + * @param bool $recursive + * @return mixed * @access public */ function nlist($dir = '.', $recursive = false) @@ -779,10 +779,10 @@ class Net_SFTP extends Net_SSH2 /** * Helper method for nlist * - * @param String $dir - * @param Boolean $recursive - * @param String $relativeDir - * @return Mixed + * @param string $dir + * @param bool $recursive + * @param string $relativeDir + * @return mixed * @access private */ function _nlist_helper($dir, $recursive, $relativeDir) @@ -815,9 +815,9 @@ class Net_SFTP extends Net_SSH2 /** * Returns a detailed list of files in the given directory * - * @param String $dir - * @param Boolean $recursive - * @return Mixed + * @param string $dir + * @param bool $recursive + * @return mixed * @access public */ function rawlist($dir = '.', $recursive = false) @@ -849,9 +849,9 @@ class Net_SFTP extends Net_SSH2 /** * Reads a list, be it detailed or not, of files in the given directory * - * @param String $dir - * @param Boolean $raw - * @return Mixed + * @param string $dir + * @param bool $raw + * @return mixed * @access private */ function _list($dir, $raw = true) @@ -959,9 +959,9 @@ class Net_SFTP extends Net_SSH2 * * Intended for use with uasort() * - * @param Array $a - * @param Array $b - * @return Integer + * @param array $a + * @param array $b + * @return int * @access private */ function _comparator($a, $b) @@ -1059,8 +1059,8 @@ class Net_SFTP extends Net_SSH2 * * Files larger than 4GB will show up as being exactly 4GB. * - * @param String $filename - * @return Mixed + * @param string $filename + * @return mixed * @access public */ function size($filename) @@ -1079,8 +1079,8 @@ class Net_SFTP extends Net_SSH2 /** * Save files / directories to cache * - * @param String $path - * @param Mixed $value + * @param string $path + * @param mixed $value * @access private */ function _update_stat_cache($path, $value) @@ -1123,8 +1123,8 @@ class Net_SFTP extends Net_SSH2 /** * Remove files / directories from cache * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access private */ function _remove_from_stat_cache($path) @@ -1150,8 +1150,8 @@ class Net_SFTP extends Net_SSH2 * * Mainly used by file_exists * - * @param String $dir - * @return Mixed + * @param string $dir + * @return mixed * @access private */ function _query_stat_cache($path) @@ -1173,8 +1173,8 @@ class Net_SFTP extends Net_SSH2 * * Returns an array on success and false otherwise. * - * @param String $filename - * @return Mixed + * @param string $filename + * @return mixed * @access public */ function stat($filename) @@ -1230,8 +1230,8 @@ class Net_SFTP extends Net_SSH2 * * Returns an array on success and false otherwise. * - * @param String $filename - * @return Mixed + * @param string $filename + * @return mixed * @access public */ function lstat($filename) @@ -1296,9 +1296,9 @@ class Net_SFTP extends Net_SSH2 * Determines information without calling Net_SFTP::_realpath(). * The second parameter can be either NET_SFTP_STAT or NET_SFTP_LSTAT. * - * @param String $filename - * @param Integer $type - * @return Mixed + * @param string $filename + * @param int $type + * @return mixed * @access private */ function _stat($filename, $type) @@ -1325,9 +1325,9 @@ class Net_SFTP extends Net_SSH2 /** * Truncates a file to a given length * - * @param String $filename - * @param Integer $new_size - * @return Boolean + * @param string $filename + * @param int $new_size + * @return bool * @access public */ function truncate($filename, $new_size) @@ -1342,10 +1342,10 @@ class Net_SFTP extends Net_SSH2 * * If the file does not exist, it will be created. * - * @param String $filename - * @param Integer $time - * @param Integer $atime - * @return Boolean + * @param string $filename + * @param int $time + * @param int $atime + * @return bool * @access public */ function touch($filename, $time = null, $atime = null) @@ -1393,10 +1393,10 @@ class Net_SFTP extends Net_SSH2 * * Returns true on success or false on error. * - * @param String $filename - * @param Integer $uid - * @param Boolean $recursive - * @return Boolean + * @param string $filename + * @param int $uid + * @param bool $recursive + * @return bool * @access public */ function chown($filename, $uid, $recursive = false) @@ -1413,10 +1413,10 @@ class Net_SFTP extends Net_SSH2 * * Returns true on success or false on error. * - * @param String $filename - * @param Integer $gid - * @param Boolean $recursive - * @return Boolean + * @param string $filename + * @param int $gid + * @param bool $recursive + * @return bool * @access public */ function chgrp($filename, $gid, $recursive = false) @@ -1432,10 +1432,10 @@ class Net_SFTP extends Net_SSH2 * Returns the new file permissions on success or false on error. * If $recursive is true than this just returns true or false. * - * @param Integer $mode - * @param String $filename - * @param Boolean $recursive - * @return Mixed + * @param int $mode + * @param string $filename + * @param bool $recursive + * @return mixed * @access public */ function chmod($mode, $filename, $recursive = false) @@ -1479,10 +1479,10 @@ class Net_SFTP extends Net_SSH2 /** * Sets information about a file * - * @param String $filename - * @param String $attr - * @param Boolean $recursive - * @return Boolean + * @param string $filename + * @param string $attr + * @param bool $recursive + * @return bool * @access private */ function _setstat($filename, $attr, $recursive) @@ -1538,10 +1538,10 @@ class Net_SFTP extends Net_SSH2 * * Minimizes directory lookups and SSH_FXP_STATUS requests for speed. * - * @param String $path - * @param String $attr - * @param Integer $i - * @return Boolean + * @param string $path + * @param string $attr + * @param int $i + * @return bool * @access private */ function _setstat_recursive($path, $attr, &$i) @@ -1608,8 +1608,8 @@ class Net_SFTP extends Net_SSH2 /** * Return the target of a symbolic link * - * @param String $link - * @return Mixed + * @param string $link + * @return mixed * @access public */ function readlink($link) @@ -1651,9 +1651,9 @@ class Net_SFTP extends Net_SSH2 * * symlink() creates a symbolic link to the existing target with the specified name link. * - * @param String $target - * @param String $link - * @return Boolean + * @param string $target + * @param string $link + * @return bool * @access public */ function symlink($target, $link) @@ -1688,8 +1688,8 @@ class Net_SFTP extends Net_SSH2 /** * Creates a directory. * - * @param String $dir - * @return Boolean + * @param string $dir + * @return bool * @access public */ function mkdir($dir, $mode = -1, $recursive = false) @@ -1723,8 +1723,8 @@ class Net_SFTP extends Net_SSH2 /** * Helper function for directory creation * - * @param String $dir - * @return Boolean + * @param string $dir + * @return bool * @access private */ function _mkdir_helper($dir, $attr) @@ -1751,8 +1751,8 @@ class Net_SFTP extends Net_SSH2 /** * Removes a directory. * - * @param String $dir - * @return Boolean + * @param string $dir + * @return bool * @access public */ function rmdir($dir) @@ -1829,13 +1829,13 @@ class Net_SFTP extends Net_SSH2 * * Setting $local_start to > 0 or $mode | NET_SFTP_RESUME_START doesn't do anything unless $mode | NET_SFTP_LOCAL_FILE. * - * @param String $remote_file - * @param String|resource $data - * @param Integer $mode - * @param Integer $start - * @param Integer $local_start + * @param string $remote_file + * @param string|resource $data + * @param int $mode + * @param int $start + * @param int $local_start * @param callable|null $progressCallback - * @return Boolean + * @return bool * @access public * @internal ASCII mode for SFTPv4/5/6 can be supported by adding a new function - Net_SFTP::setMode(). */ @@ -1989,8 +1989,8 @@ class Net_SFTP extends Net_SSH2 * 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. * - * @param Integer $i - * @return Boolean + * @param int $i + * @return bool * @access private */ function _read_put_responses($i) @@ -2015,8 +2015,8 @@ class Net_SFTP extends Net_SSH2 /** * Close handle * - * @param String $handle - * @return Boolean + * @param string $handle + * @return bool * @access private */ function _close_handle($handle) @@ -2051,11 +2051,11 @@ class Net_SFTP extends Net_SSH2 * * $offset and $length can be used to download files in chunks. * - * @param String $remote_file - * @param String $local_file - * @param Integer $offset - * @param Integer $length - * @return Mixed + * @param string $remote_file + * @param string $local_file + * @param int $offset + * @param int $length + * @return mixed * @access public */ function get($remote_file, $local_file = false, $offset = 0, $length = -1) @@ -2167,9 +2167,9 @@ class Net_SFTP extends Net_SSH2 /** * Deletes a file on the SFTP server. * - * @param String $path - * @param Boolean $recursive - * @return Boolean + * @param string $path + * @param bool $recursive + * @return bool * @access public */ function delete($path, $recursive = true) @@ -2217,9 +2217,9 @@ class Net_SFTP extends Net_SSH2 * * Minimizes directory lookups and SSH_FXP_STATUS requests for speed. * - * @param String $path - * @param Integer $i - * @return Boolean + * @param string $path + * @param int $i + * @return bool * @access private */ function _delete_recursive($path, &$i) @@ -2284,8 +2284,8 @@ class Net_SFTP extends Net_SSH2 /** * Checks whether a file or directory exists * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function file_exists($path) @@ -2307,8 +2307,8 @@ class Net_SFTP extends Net_SSH2 /** * Tells whether the filename is a directory * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function is_dir($path) @@ -2323,8 +2323,8 @@ class Net_SFTP extends Net_SSH2 /** * Tells whether the filename is a regular file * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function is_file($path) @@ -2339,8 +2339,8 @@ class Net_SFTP extends Net_SSH2 /** * Tells whether the filename is a symbolic link * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function is_link($path) @@ -2355,8 +2355,8 @@ class Net_SFTP extends Net_SSH2 /** * Gets last access time of file * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function fileatime($path) @@ -2367,8 +2367,8 @@ class Net_SFTP extends Net_SSH2 /** * Gets file modification time * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function filemtime($path) @@ -2379,8 +2379,8 @@ class Net_SFTP extends Net_SSH2 /** * Gets file permissions * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function fileperms($path) @@ -2391,8 +2391,8 @@ class Net_SFTP extends Net_SSH2 /** * Gets file owner * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function fileowner($path) @@ -2403,8 +2403,8 @@ class Net_SFTP extends Net_SSH2 /** * Gets file group * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function filegroup($path) @@ -2415,8 +2415,8 @@ class Net_SFTP extends Net_SSH2 /** * Gets file size * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function filesize($path) @@ -2427,8 +2427,8 @@ class Net_SFTP extends Net_SSH2 /** * Gets file type * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function filetype($path) @@ -2461,9 +2461,9 @@ class Net_SFTP extends Net_SSH2 * * Uses cache if appropriate. * - * @param String $path - * @param String $prop - * @return Mixed + * @param string $path + * @param string $prop + * @return mixed * @access private */ function _get_stat_cache_prop($path, $prop) @@ -2476,9 +2476,9 @@ class Net_SFTP extends Net_SSH2 * * Uses cache if appropriate. * - * @param String $path - * @param String $prop - * @return Mixed + * @param string $path + * @param string $prop + * @return mixed * @access private */ function _get_lstat_cache_prop($path, $prop) @@ -2491,9 +2491,9 @@ class Net_SFTP extends Net_SSH2 * * Uses cache if appropriate. * - * @param String $path - * @param String $prop - * @return Mixed + * @param string $path + * @param string $prop + * @return mixed * @access private */ function _get_xstat_cache_prop($path, $prop, $type) @@ -2520,9 +2520,9 @@ class Net_SFTP extends Net_SSH2 /** * Renames a file or a directory on the SFTP server * - * @param String $oldname - * @param String $newname - * @return Boolean + * @param string $oldname + * @param string $newname + * @return bool * @access public */ function rename($oldname, $newname) @@ -2570,8 +2570,8 @@ class Net_SFTP extends Net_SSH2 * * See '7. File Attributes' of draft-ietf-secsh-filexfer-13 for more info. * - * @param String $response - * @return Array + * @param string $response + * @return array * @access private */ function _parseAttributes(&$response) @@ -2624,8 +2624,8 @@ class Net_SFTP extends Net_SSH2 * * Quoting the SFTP RFC, "Implementations MUST NOT send bits that are not defined" but they seem to anyway * - * @param Integer $mode - * @return Integer + * @param int $mode + * @return int * @access private */ function _parseMode($mode) @@ -2671,8 +2671,8 @@ class Net_SFTP extends Net_SSH2 * * If the longname is in an unrecognized format bool(false) is returned. * - * @param String $longname - * @return Mixed + * @param string $longname + * @return mixed * @access private */ function _parseLongname($longname) @@ -2700,11 +2700,11 @@ class Net_SFTP extends Net_SSH2 * * See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info. * - * @param Integer $type - * @param String $data + * @param int $type + * @param string $data * @see Net_SFTP::_get_sftp_packet() * @see Net_SSH2::_send_channel_packet() - * @return Boolean + * @return bool * @access private */ function _send_sftp_packet($type, $data) @@ -2745,7 +2745,7 @@ class Net_SFTP extends Net_SSH2 * messages containing one SFTP packet. * * @see Net_SFTP::_send_sftp_packet() - * @return String + * @return string * @access private */ function _get_sftp_packet() @@ -2817,7 +2817,7 @@ class Net_SFTP extends Net_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') * * @access public - * @return String or Array + * @return string or Array */ function getSFTPLog() { @@ -2838,7 +2838,7 @@ class Net_SFTP extends Net_SSH2 /** * Returns all errors * - * @return String + * @return string * @access public */ function getSFTPErrors() @@ -2849,7 +2849,7 @@ class Net_SFTP extends Net_SSH2 /** * Returns the last error * - * @return String + * @return string * @access public */ function getLastSFTPError() @@ -2860,7 +2860,7 @@ class Net_SFTP extends Net_SSH2 /** * Get supported SFTP versions * - * @return Array + * @return array * @access public */ function getSupportedVersions() @@ -2875,8 +2875,8 @@ class Net_SFTP extends Net_SSH2 /** * Disconnect * - * @param Integer $reason - * @return Boolean + * @param int $reason + * @return bool * @access private */ function _disconnect($reason) diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index eaf10115..250c44e4 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -47,14 +47,14 @@ class Net_SFTP_Stream * * Rather than re-create the connection we re-use instances if possible * - * @var Array + * @var array */ static $instances; /** * SFTP instance * - * @var Object + * @var object * @access private */ var $sftp; @@ -62,7 +62,7 @@ class Net_SFTP_Stream /** * Path * - * @var String + * @var string * @access private */ var $path; @@ -70,7 +70,7 @@ class Net_SFTP_Stream /** * Mode * - * @var String + * @var string * @access private */ var $mode; @@ -78,7 +78,7 @@ class Net_SFTP_Stream /** * Position * - * @var Integer + * @var int * @access private */ var $pos; @@ -86,7 +86,7 @@ class Net_SFTP_Stream /** * Size * - * @var Integer + * @var int * @access private */ var $size; @@ -94,7 +94,7 @@ class Net_SFTP_Stream /** * Directory entries * - * @var Array + * @var array * @access private */ var $entries; @@ -102,7 +102,7 @@ class Net_SFTP_Stream /** * EOF flag * - * @var Boolean + * @var bool * @access private */ var $eof; @@ -112,7 +112,7 @@ class Net_SFTP_Stream * * Technically this needs to be publically accessible so PHP can set it directly * - * @var Resource + * @var resource * @access public */ var $context; @@ -120,7 +120,7 @@ class Net_SFTP_Stream /** * Notification callback function * - * @var Callable + * @var callable * @access public */ var $notification; @@ -128,8 +128,8 @@ class Net_SFTP_Stream /** * Registers this class as a URL wrapper. * - * @param String $protocol The wrapper name to be registered. - * @return Boolean True on success, false otherwise. + * @param string $protocol The wrapper name to be registered. + * @return bool True on success, false otherwise. * @access public */ static function register($protocol = 'sftp') @@ -165,8 +165,8 @@ class Net_SFTP_Stream * 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. * - * @param String $path - * @return String + * @param string $path + * @return string * @access private */ function _parse_path($path) @@ -257,11 +257,11 @@ class Net_SFTP_Stream /** * Opens file or URL * - * @param String $path - * @param String $mode - * @param Integer $options - * @param String $opened_path - * @return Boolean + * @param string $path + * @param string $mode + * @param int $options + * @param string $opened_path + * @return bool * @access public */ function _stream_open($path, $mode, $options, &$opened_path) @@ -302,8 +302,8 @@ class Net_SFTP_Stream /** * Read from stream * - * @param Integer $count - * @return Mixed + * @param int $count + * @return mixed * @access public */ function _stream_read($count) @@ -344,8 +344,8 @@ class Net_SFTP_Stream /** * Write to stream * - * @param String $data - * @return Mixed + * @param string $data + * @return mixed * @access public */ function _stream_write($data) @@ -379,7 +379,7 @@ class Net_SFTP_Stream /** * Retrieve the current position of a stream * - * @return Integer + * @return int * @access public */ function _stream_tell() @@ -397,7 +397,7 @@ class Net_SFTP_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. * - * @return Boolean + * @return bool * @access public */ function _stream_eof() @@ -408,9 +408,9 @@ class Net_SFTP_Stream /** * Seeks to specific location in a stream * - * @param Integer $offset - * @param Integer $whence - * @return Boolean + * @param int $offset + * @param int $whence + * @return bool * @access public */ function _stream_seek($offset, $whence) @@ -436,10 +436,10 @@ class Net_SFTP_Stream /** * Change stream options * - * @param String $path - * @param Integer $option - * @param Mixed $var - * @return Boolean + * @param string $path + * @param int $option + * @param mixed $var + * @return bool * @access public */ function _stream_metadata($path, $option, $var) @@ -470,8 +470,8 @@ class Net_SFTP_Stream /** * Retrieve the underlaying resource * - * @param Integer $cast_as - * @return Resource + * @param int $cast_as + * @return resource * @access public */ function _stream_cast($cast_as) @@ -482,8 +482,8 @@ class Net_SFTP_Stream /** * Advisory file locking * - * @param Integer $operation - * @return Boolean + * @param int $operation + * @return bool * @access public */ function _stream_lock($operation) @@ -498,9 +498,9 @@ class Net_SFTP_Stream * If newname exists, it will be overwritten. This is a departure from what Net_SFTP * does. * - * @param String $path_from - * @param String $path_to - * @return Boolean + * @param string $path_from + * @param string $path_to + * @return bool * @access public */ function _rename($path_from, $path_to) @@ -550,9 +550,9 @@ class Net_SFTP_Stream * string longname * ATTRS attrs * - * @param String $path - * @param Integer $options - * @return Boolean + * @param string $path + * @param int $options + * @return bool * @access public */ function _dir_opendir($path, $options) @@ -569,7 +569,7 @@ class Net_SFTP_Stream /** * Read entry from directory handle * - * @return Mixed + * @return mixed * @access public */ function _dir_readdir() @@ -583,7 +583,7 @@ class Net_SFTP_Stream /** * Rewind directory handle * - * @return Boolean + * @return bool * @access public */ function _dir_rewinddir() @@ -595,7 +595,7 @@ class Net_SFTP_Stream /** * Close directory handle * - * @return Boolean + * @return bool * @access public */ function _dir_closedir() @@ -608,10 +608,10 @@ class Net_SFTP_Stream * * Only valid $options is STREAM_MKDIR_RECURSIVE * - * @param String $path - * @param Integer $mode - * @param Integer $options - * @return Boolean + * @param string $path + * @param int $mode + * @param int $options + * @return bool * @access public */ function _mkdir($path, $mode, $options) @@ -632,10 +632,10 @@ class Net_SFTP_Stream * 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? * - * @param String $path - * @param Integer $mode - * @param Integer $options - * @return Boolean + * @param string $path + * @param int $mode + * @param int $options + * @return bool * @access public */ function _rmdir($path, $options) @@ -653,7 +653,7 @@ class Net_SFTP_Stream * * See . Always returns true because Net_SFTP doesn't cache stuff before writing * - * @return Boolean + * @return bool * @access public */ function _stream_flush() @@ -664,7 +664,7 @@ class Net_SFTP_Stream /** * Retrieve information about a file resource * - * @return Mixed + * @return mixed * @access public */ function _stream_stat() @@ -679,8 +679,8 @@ class Net_SFTP_Stream /** * Delete a file * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function _unlink($path) @@ -700,9 +700,9 @@ class Net_SFTP_Stream * 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 * - * @param String $path - * @param Integer $flags - * @return Mixed + * @param string $path + * @param int $flags + * @return mixed * @access public */ function _url_stat($path, $flags) @@ -723,8 +723,8 @@ class Net_SFTP_Stream /** * Truncate stream * - * @param Integer $new_size - * @return Boolean + * @param int $new_size + * @return bool * @access public */ function _stream_truncate($new_size) @@ -745,10 +745,10 @@ class Net_SFTP_Stream * 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 Net_SFTP. * - * @param Integer $option - * @param Integer $arg1 - * @param Integer $arg2 - * @return Boolean + * @param int $option + * @param int $arg1 + * @param int $arg2 + * @return bool * @access public */ function _stream_set_option($option, $arg1, $arg2) @@ -775,9 +775,9 @@ class Net_SFTP_Stream * 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. * - * @param String - * @param Array - * @return Mixed + * @param string + * @param array + * @return mixed * @access public */ function __call($name, $arguments) diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index 22d9ba1f..2d1427af 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -235,7 +235,7 @@ class Net_SSH1 /** * The SSH identifier * - * @var String + * @var string * @access private */ var $identifier = 'SSH-1.5-phpseclib'; @@ -243,7 +243,7 @@ class Net_SSH1 /** * The Socket Object * - * @var Object + * @var object * @access private */ var $fsock; @@ -251,7 +251,7 @@ class Net_SSH1 /** * The cryptography object * - * @var Object + * @var object * @access private */ var $crypto = false; @@ -262,7 +262,7 @@ class Net_SSH1 * 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. * - * @var Integer + * @var int * @access private */ var $bitmap = 0; @@ -273,7 +273,7 @@ class Net_SSH1 * Logged for debug purposes * * @see Net_SSH1::getServerKeyPublicExponent() - * @var String + * @var string * @access private */ var $server_key_public_exponent; @@ -284,7 +284,7 @@ class Net_SSH1 * Logged for debug purposes * * @see Net_SSH1::getServerKeyPublicModulus() - * @var String + * @var string * @access private */ var $server_key_public_modulus; @@ -295,7 +295,7 @@ class Net_SSH1 * Logged for debug purposes * * @see Net_SSH1::getHostKeyPublicExponent() - * @var String + * @var string * @access private */ var $host_key_public_exponent; @@ -306,7 +306,7 @@ class Net_SSH1 * Logged for debug purposes * * @see Net_SSH1::getHostKeyPublicModulus() - * @var String + * @var string * @access private */ var $host_key_public_modulus; @@ -317,7 +317,7 @@ class Net_SSH1 * Logged for debug purposes * * @see Net_SSH1::getSupportedCiphers() - * @var Array + * @var array * @access private */ var $supported_ciphers = array( @@ -336,7 +336,7 @@ class Net_SSH1 * Logged for debug purposes * * @see Net_SSH1::getSupportedAuthentications() - * @var Array + * @var array * @access private */ var $supported_authentications = array( @@ -350,7 +350,7 @@ class Net_SSH1 * Server Identification * * @see Net_SSH1::getServerIdentification() - * @var String + * @var string * @access private */ var $server_identification = ''; @@ -359,7 +359,7 @@ class Net_SSH1 * Protocol Flags * * @see Net_SSH1::Net_SSH1() - * @var Array + * @var array * @access private */ var $protocol_flags = array(); @@ -368,7 +368,7 @@ class Net_SSH1 * Protocol Flag Log * * @see Net_SSH1::getLog() - * @var Array + * @var array * @access private */ var $protocol_flag_log = array(); @@ -377,7 +377,7 @@ class Net_SSH1 * Message Log * * @see Net_SSH1::getLog() - * @var Array + * @var array * @access private */ var $message_log = array(); @@ -386,7 +386,7 @@ class Net_SSH1 * Real-time log file pointer * * @see Net_SSH1::_append_log() - * @var Resource + * @var resource * @access private */ var $realtime_log_file; @@ -395,7 +395,7 @@ class Net_SSH1 * Real-time log file size * * @see Net_SSH1::_append_log() - * @var Integer + * @var int * @access private */ var $realtime_log_size; @@ -404,7 +404,7 @@ class Net_SSH1 * Real-time log file wrap boolean * * @see Net_SSH1::_append_log() - * @var Boolean + * @var bool * @access private */ var $realtime_log_wrap; @@ -413,7 +413,7 @@ class Net_SSH1 * Interactive Buffer * * @see Net_SSH1::read() - * @var Array + * @var array * @access private */ var $interactiveBuffer = ''; @@ -463,7 +463,7 @@ class Net_SSH1 * * @see Net_SSH1::Net_SSH1() * @see Net_SSH1::_connect() - * @var String + * @var string * @access private */ var $host; @@ -473,7 +473,7 @@ class Net_SSH1 * * @see Net_SSH1::Net_SSH1() * @see Net_SSH1::_connect() - * @var Integer + * @var int * @access private */ var $port; @@ -488,7 +488,7 @@ class Net_SSH1 * * @see Net_SSH1::Net_SSH1() * @see Net_SSH1::_connect() - * @var Integer + * @var int * @access private */ var $connectionTimeout; @@ -498,7 +498,7 @@ class Net_SSH1 * * @see Net_SSH1::Net_SSH1() * @see Net_SSH1::_connect() - * @var Integer + * @var int * @access private */ var $cipher; @@ -508,10 +508,10 @@ class Net_SSH1 * * Connects to an SSHv1 server * - * @param String $host - * @param Integer $port - * @param Integer $timeout - * @param Integer $cipher + * @param string $host + * @param int $port + * @param int $timeout + * @param int $cipher * @return Net_SSH1 * @access public */ @@ -560,7 +560,7 @@ class Net_SSH1 /** * Connect to an SSHv1 server * - * @return Boolean + * @return bool * @access private */ function _connect() @@ -727,9 +727,9 @@ class Net_SSH1 /** * Login * - * @param String $username - * @param String $password - * @return Boolean + * @param string $username + * @param string $password + * @return bool * @access public */ function login($username, $password = '') @@ -800,7 +800,7 @@ class Net_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. * Setting $timeout to false or 0 will mean there is no timeout. * - * @param Mixed $timeout + * @param mixed $timeout */ function setTimeout($timeout) { @@ -823,7 +823,7 @@ class Net_SSH1 * * @see Net_SSH1::interactiveRead() * @see Net_SSH1::interactiveWrite() - * @param String $cmd + * @param string $cmd * @return mixed * @access public */ @@ -873,7 +873,7 @@ class Net_SSH1 * * @see Net_SSH1::interactiveRead() * @see Net_SSH1::interactiveWrite() - * @return Boolean + * @return bool * @access private */ function _initShell() @@ -916,8 +916,8 @@ class Net_SSH1 * Inputs a command into an interactive shell. * * @see Net_SSH1::interactiveWrite() - * @param String $cmd - * @return Boolean + * @param string $cmd + * @return bool * @access public */ function write($cmd) @@ -932,9 +932,9 @@ class Net_SSH1 * a regular expression. * * @see Net_SSH1::write() - * @param String $expect - * @param Integer $mode - * @return Boolean + * @param string $expect + * @param int $mode + * @return bool * @access public */ function read($expect, $mode = NET_SSH1_READ_SIMPLE) @@ -972,8 +972,8 @@ class Net_SSH1 * Inputs a command into an interactive shell. * * @see Net_SSH1::interactiveRead() - * @param String $cmd - * @return Boolean + * @param string $cmd + * @return bool * @access public */ function interactiveWrite($cmd) @@ -1008,7 +1008,7 @@ class Net_SSH1 * there's not going to be much recourse. * * @see Net_SSH1::interactiveRead() - * @return String + * @return string * @access public */ function interactiveRead() @@ -1059,7 +1059,7 @@ class Net_SSH1 /** * Disconnect * - * @param String $msg + * @param string $msg * @access private */ function _disconnect($msg = 'Client Quit') @@ -1097,7 +1097,7 @@ class Net_SSH1 * http://www.securiteam.com/securitynews/5LP042K3FY.html * * @see Net_SSH1::_send_binary_packet() - * @return Array + * @return array * @access private */ function _get_binary_packet() @@ -1173,8 +1173,8 @@ class Net_SSH1 * Returns true on success, false on failure. * * @see Net_SSH1::_get_binary_packet() - * @param String $data - * @return Boolean + * @param string $data + * @return bool * @access private */ function _send_binary_packet($data) @@ -1221,8 +1221,8 @@ class Net_SSH1 * * @see Net_SSH1::_get_binary_packet() * @see Net_SSH1::_send_binary_packet() - * @param String $data - * @return Integer + * @param string $data + * @return int * @access private */ function _crc($data) @@ -1317,9 +1317,9 @@ class Net_SSH1 * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) @@ -1338,7 +1338,7 @@ class Net_SSH1 * * @see Net_SSH1::Net_SSH1() * @param Math_BigInteger $m - * @param Array $key + * @param array $key * @return Math_BigInteger * @access private */ @@ -1391,7 +1391,7 @@ class Net_SSH1 * 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. * - * @param Array $array + * @param array $array * @access private */ function _define_array() @@ -1414,7 +1414,7 @@ class Net_SSH1 * Returns a string if NET_SSH1_LOGGING == NET_SSH1_LOG_COMPLEX, an array if NET_SSH1_LOGGING == NET_SSH1_LOG_SIMPLE and false if !defined('NET_SSH1_LOGGING') * * @access public - * @return String or Array + * @return string or Array */ function getLog() { @@ -1437,10 +1437,10 @@ class Net_SSH1 /** * Formats a log for printing * - * @param Array $message_log - * @param Array $message_number_log + * @param array $message_log + * @param array $message_number_log * @access private - * @return String + * @return string */ function _format_log($message_log, $message_number_log) { @@ -1473,9 +1473,9 @@ class Net_SSH1 * * For use with preg_replace_callback() * - * @param Array $matches + * @param array $matches * @access private - * @return String + * @return string */ function _format_log_helper($matches) { @@ -1488,8 +1488,8 @@ class Net_SSH1 * 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. * - * @param Boolean $raw_output - * @return String + * @param bool $raw_output + * @return string * @access public */ function getServerKeyPublicExponent($raw_output = false) @@ -1503,8 +1503,8 @@ class Net_SSH1 * 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. * - * @param Boolean $raw_output - * @return String + * @param bool $raw_output + * @return string * @access public */ function getServerKeyPublicModulus($raw_output = false) @@ -1518,8 +1518,8 @@ class Net_SSH1 * 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. * - * @param Boolean $raw_output - * @return String + * @param bool $raw_output + * @return string * @access public */ function getHostKeyPublicExponent($raw_output = false) @@ -1533,8 +1533,8 @@ class Net_SSH1 * 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. * - * @param Boolean $raw_output - * @return String + * @param bool $raw_output + * @return string * @access public */ function getHostKeyPublicModulus($raw_output = false) @@ -1549,8 +1549,8 @@ class Net_SSH1 * is set to true, returns, instead, an array of constants. ie. instead of array('Triple-DES in CBC mode'), you'll * get array(NET_SSH1_CIPHER_3DES). * - * @param Boolean $raw_output - * @return Array + * @param bool $raw_output + * @return array * @access public */ function getSupportedCiphers($raw_output = false) @@ -1565,8 +1565,8 @@ class Net_SSH1 * is set to true, returns, instead, an array of constants. ie. instead of array('password authentication'), you'll * get array(NET_SSH1_AUTH_PASSWORD). * - * @param Boolean $raw_output - * @return Array + * @param bool $raw_output + * @return array * @access public */ function getSupportedAuthentications($raw_output = false) @@ -1577,7 +1577,7 @@ class Net_SSH1 /** * Return the server identification. * - * @return String + * @return string * @access public */ function getServerIdentification() @@ -1590,7 +1590,7 @@ class Net_SSH1 * * Makes sure that only the last 1MB worth of packets will be logged * - * @param String $data + * @param string $data * @access private */ function _append_log($protocol_flags, $message) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 98cce0b7..5543e081 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -154,7 +154,7 @@ class Net_SSH2 /** * The SSH identifier * - * @var String + * @var string * @access private */ var $identifier; @@ -162,7 +162,7 @@ class Net_SSH2 /** * The Socket Object * - * @var Object + * @var object * @access private */ var $fsock; @@ -173,7 +173,7 @@ class Net_SSH2 * 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. * - * @var Integer + * @var int * @access private */ var $bitmap = 0; @@ -183,7 +183,7 @@ class Net_SSH2 * * @see Net_SSH2::getErrors() * @see Net_SSH2::getLastError() - * @var String + * @var string * @access private */ var $errors = array(); @@ -210,7 +210,7 @@ class Net_SSH2 * Minimum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods * * @see Net_SSH2::_key_exchange() - * @var Integer + * @var int * @access private */ var $kex_dh_group_size_min = 1536; @@ -219,7 +219,7 @@ class Net_SSH2 * Preferred Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods * * @see Net_SSH2::_key_exchange() - * @var Integer + * @var int * @access private */ var $kex_dh_group_size_preferred = 2048; @@ -228,7 +228,7 @@ class Net_SSH2 * Maximum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods * * @see Net_SSH2::_key_exchange() - * @var Integer + * @var int * @access private */ var $kex_dh_group_size_max = 4096; @@ -326,7 +326,7 @@ class Net_SSH2 * * @see Net_SSH2::Net_SSH2() * @see Net_SSH2::_send_binary_packet() - * @var Integer + * @var int * @access private */ var $encrypt_block_size = 8; @@ -336,7 +336,7 @@ class Net_SSH2 * * @see Net_SSH2::Net_SSH2() * @see Net_SSH2::_get_binary_packet() - * @var Integer + * @var int * @access private */ var $decrypt_block_size = 8; @@ -345,7 +345,7 @@ class Net_SSH2 * Server to Client Encryption Object * * @see Net_SSH2::_get_binary_packet() - * @var Object + * @var object * @access private */ var $decrypt = false; @@ -354,7 +354,7 @@ class Net_SSH2 * Client to Server Encryption Object * * @see Net_SSH2::_send_binary_packet() - * @var Object + * @var object * @access private */ var $encrypt = false; @@ -363,7 +363,7 @@ class Net_SSH2 * Client to Server HMAC Object * * @see Net_SSH2::_send_binary_packet() - * @var Object + * @var object * @access private */ var $hmac_create = false; @@ -372,7 +372,7 @@ class Net_SSH2 * Server to Client HMAC Object * * @see Net_SSH2::_get_binary_packet() - * @var Object + * @var object * @access private */ var $hmac_check = false; @@ -385,7 +385,7 @@ class Net_SSH2 * append it. * * @see Net_SSH2::_get_binary_packet() - * @var Integer + * @var int * @access private */ var $hmac_size = false; @@ -394,7 +394,7 @@ class Net_SSH2 * Server Public Host Key * * @see Net_SSH2::getServerPublicHostKey() - * @var String + * @var string * @access private */ var $server_public_host_key; @@ -409,7 +409,7 @@ class Net_SSH2 * -- http://tools.ietf.org/html/rfc4253#section-7.2 * * @see Net_SSH2::_key_exchange() - * @var String + * @var string * @access private */ var $session_id = false; @@ -420,7 +420,7 @@ class Net_SSH2 * The current exchange hash * * @see Net_SSH2::_key_exchange() - * @var String + * @var string * @access private */ var $exchange_hash = false; @@ -429,7 +429,7 @@ class Net_SSH2 * Message Numbers * * @see Net_SSH2::Net_SSH2() - * @var Array + * @var array * @access private */ var $message_numbers = array(); @@ -438,7 +438,7 @@ class Net_SSH2 * Disconnection Message 'reason codes' defined in RFC4253 * * @see Net_SSH2::Net_SSH2() - * @var Array + * @var array * @access private */ var $disconnect_reasons = array(); @@ -447,7 +447,7 @@ class Net_SSH2 * SSH_MSG_CHANNEL_OPEN_FAILURE 'reason codes', defined in RFC4254 * * @see Net_SSH2::Net_SSH2() - * @var Array + * @var array * @access private */ var $channel_open_failure_reasons = array(); @@ -457,7 +457,7 @@ class Net_SSH2 * * @link http://tools.ietf.org/html/rfc4254#section-8 * @see Net_SSH2::Net_SSH2() - * @var Array + * @var array * @access private */ var $terminal_modes = array(); @@ -467,7 +467,7 @@ class Net_SSH2 * * @link http://tools.ietf.org/html/rfc4254#section-5.2 * @see Net_SSH2::Net_SSH2() - * @var Array + * @var array * @access private */ var $channel_extended_data_type_codes = array(); @@ -478,7 +478,7 @@ class Net_SSH2 * See 'Section 6.4. Data Integrity' of rfc4253 for more info. * * @see Net_SSH2::_send_binary_packet() - * @var Integer + * @var int * @access private */ var $send_seq_no = 0; @@ -489,7 +489,7 @@ class Net_SSH2 * See 'Section 6.4. Data Integrity' of rfc4253 for more info. * * @see Net_SSH2::_get_binary_packet() - * @var Integer + * @var int * @access private */ var $get_seq_no = 0; @@ -501,7 +501,7 @@ class Net_SSH2 * * @see Net_SSH2::_get_channel_packet() * @see Net_SSH2::exec() - * @var Array + * @var array * @access private */ var $server_channels = array(); @@ -514,7 +514,7 @@ class Net_SSH2 * * @see Net_SSH2::_get_channel_packet() * @see Net_SSH2::exec() - * @var Array + * @var array * @access private */ var $channel_buffers = array(); @@ -525,7 +525,7 @@ class Net_SSH2 * Contains the type of the last sent message * * @see Net_SSH2::_get_channel_packet() - * @var Array + * @var array * @access private */ var $channel_status = array(); @@ -536,7 +536,7 @@ class Net_SSH2 * Maximum packet size indexed by channel * * @see Net_SSH2::_send_channel_packet() - * @var Array + * @var array * @access private */ var $packet_size_client_to_server = array(); @@ -545,7 +545,7 @@ class Net_SSH2 * Message Number Log * * @see Net_SSH2::getLog() - * @var Array + * @var array * @access private */ var $message_number_log = array(); @@ -554,7 +554,7 @@ class Net_SSH2 * Message Log * * @see Net_SSH2::getLog() - * @var Array + * @var array * @access private */ var $message_log = array(); @@ -564,7 +564,7 @@ class Net_SSH2 * * Bytes the other party can send before it must wait for the window to be adjusted (0x7FFFFFFF = 2GB) * - * @var Integer + * @var int * @see Net_SSH2::_send_channel_packet() * @see Net_SSH2::exec() * @access private @@ -577,7 +577,7 @@ class Net_SSH2 * Window size indexed by channel * * @see Net_SSH2::_send_channel_packet() - * @var Array + * @var array * @access private */ var $window_size_server_to_client = array(); @@ -588,7 +588,7 @@ class Net_SSH2 * Window size indexed by channel * * @see Net_SSH2::_get_channel_packet() - * @var Array + * @var array * @access private */ var $window_size_client_to_server = array(); @@ -599,7 +599,7 @@ class Net_SSH2 * Verified against $this->session_id * * @see Net_SSH2::getServerPublicHostKey() - * @var String + * @var string * @access private */ var $signature = ''; @@ -610,7 +610,7 @@ class Net_SSH2 * ssh-rsa or ssh-dss. * * @see Net_SSH2::getServerPublicHostKey() - * @var String + * @var string * @access private */ var $signature_format = ''; @@ -619,7 +619,7 @@ class Net_SSH2 * Interactive Buffer * * @see Net_SSH2::read() - * @var Array + * @var array * @access private */ var $interactiveBuffer = ''; @@ -631,7 +631,7 @@ class Net_SSH2 * * @see Net_SSH2::_send_binary_packet() * @see Net_SSH2::_get_binary_packet() - * @var Integer + * @var int * @access private */ var $log_size; @@ -656,7 +656,7 @@ class Net_SSH2 * Real-time log file pointer * * @see Net_SSH2::_append_log() - * @var Resource + * @var resource * @access private */ var $realtime_log_file; @@ -665,7 +665,7 @@ class Net_SSH2 * Real-time log file size * * @see Net_SSH2::_append_log() - * @var Integer + * @var int * @access private */ var $realtime_log_size; @@ -674,7 +674,7 @@ class Net_SSH2 * Has the signature been validated? * * @see Net_SSH2::getServerPublicHostKey() - * @var Boolean + * @var bool * @access private */ var $signature_validated = false; @@ -698,7 +698,7 @@ class Net_SSH2 /** * Time of first network activity * - * @var Integer + * @var int * @access private */ var $last_packet; @@ -706,7 +706,7 @@ class Net_SSH2 /** * Exit status returned from ssh if any * - * @var Integer + * @var int * @access private */ var $exit_status; @@ -714,7 +714,7 @@ class Net_SSH2 /** * Flag to request a PTY when using exec() * - * @var Boolean + * @var bool * @see Net_SSH2::enablePTY() * @access private */ @@ -723,7 +723,7 @@ class Net_SSH2 /** * Flag set while exec() is running when using enablePTY() * - * @var Boolean + * @var bool * @access private */ var $in_request_pty_exec = false; @@ -731,7 +731,7 @@ class Net_SSH2 /** * Flag set after startSubsystem() is called * - * @var Boolean + * @var bool * @access private */ var $in_subsystem; @@ -739,7 +739,7 @@ class Net_SSH2 /** * Contents of stdError * - * @var String + * @var string * @access private */ var $stdErrorLog; @@ -748,7 +748,7 @@ class Net_SSH2 * The Last Interactive Response * * @see Net_SSH2::_keyboard_interactive_process() - * @var String + * @var string * @access private */ var $last_interactive_response = ''; @@ -757,7 +757,7 @@ class Net_SSH2 * Keyboard Interactive Request / Responses * * @see Net_SSH2::_keyboard_interactive_process() - * @var Array + * @var array * @access private */ var $keyboard_requests_responses = array(); @@ -770,7 +770,7 @@ class Net_SSH2 * * @see Net_SSH2::_filter() * @see Net_SSH2::getBannerMessage() - * @var String + * @var string * @access private */ var $banner_message = ''; @@ -779,7 +779,7 @@ class Net_SSH2 * Did read() timeout or return normally? * * @see Net_SSH2::isTimeout() - * @var Boolean + * @var bool * @access private */ var $is_timeout = false; @@ -788,7 +788,7 @@ class Net_SSH2 * Log Boundary * * @see Net_SSH2::_format_log() - * @var String + * @var string * @access private */ var $log_boundary = ':'; @@ -797,7 +797,7 @@ class Net_SSH2 * Log Long Width * * @see Net_SSH2::_format_log() - * @var Integer + * @var int * @access private */ var $log_long_width = 65; @@ -806,7 +806,7 @@ class Net_SSH2 * Log Short Width * * @see Net_SSH2::_format_log() - * @var Integer + * @var int * @access private */ var $log_short_width = 16; @@ -816,7 +816,7 @@ class Net_SSH2 * * @see Net_SSH2::Net_SSH2() * @see Net_SSH2::_connect() - * @var String + * @var string * @access private */ var $host; @@ -826,7 +826,7 @@ class Net_SSH2 * * @see Net_SSH2::Net_SSH2() * @see Net_SSH2::_connect() - * @var Integer + * @var int * @access private */ var $port; @@ -837,7 +837,7 @@ class Net_SSH2 * @see Net_SSH2::getWindowColumns() * @see Net_SSH2::setWindowColumns() * @see Net_SSH2::setWindowSize() - * @var Integer + * @var int * @access private */ var $windowColumns = 80; @@ -848,7 +848,7 @@ class Net_SSH2 * @see Net_SSH2::getWindowRows() * @see Net_SSH2::setWindowRows() * @see Net_SSH2::setWindowSize() - * @var Integer + * @var int * @access private */ var $windowRows = 24; @@ -858,7 +858,7 @@ class Net_SSH2 * * @see Net_SSH2::setCryptoEngine() * @see Net_SSH2::_key_exchange() - * @var Integer + * @var int * @access private */ var $crypto_engine = false; @@ -876,9 +876,9 @@ class Net_SSH2 * * $host can either be a string, representing the host, or a stream resource. * - * @param Mixed $host - * @param Integer $port - * @param Integer $timeout + * @param mixed $host + * @param int $port + * @param int $timeout * @see Net_SSH2::login() * @return Net_SSH2 * @access public @@ -998,7 +998,7 @@ class Net_SSH2 * Possible $engine values: * CRYPT_MODE_INTERNAL, CRYPT_MODE_MCRYPT * - * @param Integer $engine + * @param int $engine * @access private */ function setCryptoEngine($engine) @@ -1009,7 +1009,7 @@ class Net_SSH2 /** * Connect to an SSHv2 server * - * @return Boolean + * @return bool * @access private */ function _connect() @@ -1130,7 +1130,7 @@ class Net_SSH2 * You should overwrite this method in your own class if you want to use another identifier * * @access protected - * @return String + * @return string */ function _generate_identifier() { @@ -1159,7 +1159,7 @@ class Net_SSH2 /** * Key Exchange * - * @param String $kexinit_payload_server + * @param string $kexinit_payload_server * @access private */ function _key_exchange($kexinit_payload_server) @@ -1897,8 +1897,8 @@ class Net_SSH2 /** * Maps an encryption algorithm name to the number of key bytes. * - * @param String $algorithm Name of the encryption algorithm - * @return Mixed Number of bytes as an integer or null for unknown + * @param string $algorithm Name of the encryption algorithm + * @return mixed Number of bytes as an integer or null for unknown * @access private */ function _encryption_algorithm_to_key_size($algorithm) @@ -1938,10 +1938,10 @@ class Net_SSH2 * * The $password parameter can be a plaintext password, a Crypt_RSA object or an array * - * @param String $username - * @param Mixed $password - * @param Mixed $... - * @return Boolean + * @param string $username + * @param mixed $password + * @param mixed $... + * @return bool * @see _login * @access public */ @@ -1954,10 +1954,10 @@ class Net_SSH2 /** * Login Helper * - * @param String $username - * @param Mixed $password - * @param Mixed $... - * @return Boolean + * @param string $username + * @param mixed $password + * @param mixed $... + * @return bool * @see _login_helper * @access private */ @@ -1985,9 +1985,9 @@ class Net_SSH2 /** * Login Helper * - * @param String $username - * @param String $password - * @return Boolean + * @param string $username + * @param string $password + * @return bool * @access private * @internal It might be worthwhile, at some point, to protect against {@link http://tools.ietf.org/html/rfc4251#section-9.3.9 traffic analysis} * by sending dummy SSH_MSG_IGNORE messages. @@ -2163,9 +2163,9 @@ class Net_SSH2 * * See {@link http://tools.ietf.org/html/rfc4256 RFC4256} for details. This is not a full-featured keyboard-interactive authenticator. * - * @param String $username - * @param String $password - * @return Boolean + * @param string $username + * @param string $password + * @return bool * @access private */ function _keyboard_interactive_login($username, $password) @@ -2195,8 +2195,8 @@ class Net_SSH2 /** * Handle the keyboard-interactive requests / responses. * - * @param String $responses... - * @return Boolean + * @param string $responses... + * @return bool * @access private */ function _keyboard_interactive_process() @@ -2309,9 +2309,9 @@ class Net_SSH2 /** * Login with an ssh-agent provided key * - * @param String $username + * @param string $username * @param System_SSH_Agent $agent - * @return Boolean + * @return bool * @access private */ function _ssh_agent_login($username, $agent) @@ -2330,9 +2330,9 @@ class Net_SSH2 /** * Login with an RSA private key * - * @param String $username + * @param string $username * @param Crypt_RSA $password - * @return Boolean + * @return bool * @access private * @internal It might be worthwhile, at some point, to protect against {@link http://tools.ietf.org/html/rfc4251#section-9.3.9 traffic analysis} * by sending dummy SSH_MSG_IGNORE messages. @@ -2437,7 +2437,7 @@ class Net_SSH2 * $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. * - * @param Mixed $timeout + * @param mixed $timeout * @access public */ function setTimeout($timeout) @@ -2461,9 +2461,9 @@ class Net_SSH2 * If $callback is set to false then Net_SSH2::_get_channel_packet(NET_SSH2_CHANNEL_EXEC) will need to be called manually. * In all likelihood, this is not a feature you want to be taking advantage of. * - * @param String $command + * @param string $command * @param Callback $callback - * @return String + * @return string * @access public */ function exec($command, $callback = null) @@ -2611,7 +2611,7 @@ class Net_SSH2 * * @see Net_SSH2::read() * @see Net_SSH2::write() - * @return Boolean + * @return bool * @access private */ function _initShell() @@ -2715,7 +2715,7 @@ class Net_SSH2 * * @see Net_SSH2::read() * @see Net_SSH2::write() - * @return Integer + * @return int * @access public */ function _get_interactive_channel() @@ -2733,7 +2733,7 @@ class Net_SSH2 /** * Return an available open channel * - * @return Integer + * @return int * @access public */ function _get_open_channel() @@ -2755,9 +2755,9 @@ class Net_SSH2 * if $mode == NET_SSH2_READ_REGEX, a regular expression. * * @see Net_SSH2::write() - * @param String $expect - * @param Integer $mode - * @return String + * @param string $expect + * @param int $mode + * @return string * @access public */ function read($expect = '', $mode = NET_SSH2_READ_SIMPLE) @@ -2801,8 +2801,8 @@ class Net_SSH2 * Inputs a command into an interactive shell. * * @see Net_SSH2::read() - * @param String $cmd - * @return Boolean + * @param string $cmd + * @return bool * @access public */ function write($cmd) @@ -2830,8 +2830,8 @@ class Net_SSH2 * if there's sufficient demand for such a feature. * * @see Net_SSH2::stopSubsystem() - * @param String $subsystem - * @return Boolean + * @param string $subsystem + * @return bool * @access public */ function startSubsystem($subsystem) @@ -2893,7 +2893,7 @@ class Net_SSH2 * Stops a subsystem. * * @see Net_SSH2::startSubsystem() - * @return Boolean + * @return bool * @access public */ function stopSubsystem() @@ -2956,7 +2956,7 @@ class Net_SSH2 /** * Is the connection still active? * - * @return boolean + * @return bool * @access public */ function isConnected() @@ -2970,7 +2970,7 @@ class Net_SSH2 * See '6. Binary Packet Protocol' of rfc4253 for more info. * * @see Net_SSH2::_send_binary_packet() - * @return String + * @return string * @access private */ function _get_binary_packet() @@ -3063,7 +3063,7 @@ class Net_SSH2 * Because some binary packets need to be ignored... * * @see Net_SSH2::_get_binary_packet() - * @return String + * @return string * @access private */ function _filter($payload) @@ -3215,7 +3215,7 @@ class Net_SSH2 * @see Net_SSH2::disableQuietMode() * * @access public - * @return boolean + * @return bool */ function isQuietModeEnabled() { @@ -3249,7 +3249,7 @@ class Net_SSH2 * @see Net_SSH2::disablePTY() * * @access public - * @return boolean + * @return bool */ function isPTYEnabled() { @@ -3262,7 +3262,7 @@ class Net_SSH2 * Returns the data as a string if it's available and false if not. * * @param $client_channel - * @return Mixed + * @return mixed * @access private */ function _get_channel_packet($client_channel, $skip_extended = false) @@ -3477,10 +3477,10 @@ class Net_SSH2 * * See '6. Binary Packet Protocol' of rfc4253 for more info. * - * @param String $data - * @param String $logged + * @param string $data + * @param string $logged * @see Net_SSH2::_get_binary_packet() - * @return Boolean + * @return bool * @access private */ function _send_binary_packet($data, $logged = null) @@ -3538,7 +3538,7 @@ class Net_SSH2 * * Makes sure that only the last 1MB worth of packets will be logged * - * @param String $data + * @param string $data * @access private */ function _append_log($message_number, $message) @@ -3614,9 +3614,9 @@ class Net_SSH2 * * Spans multiple SSH_MSG_CHANNEL_DATAs if appropriate * - * @param Integer $client_channel - * @param String $data - * @return Boolean + * @param int $client_channel + * @param string $data + * @return bool * @access private */ function _send_channel_packet($client_channel, $data) @@ -3662,9 +3662,9 @@ class Net_SSH2 * and for SFTP channels are presumably closed when the client disconnects. This functions is intended * for SCP more than anything. * - * @param Integer $client_channel - * @param Boolean $want_reply - * @return Boolean + * @param int $client_channel + * @param bool $want_reply + * @return bool * @access private */ function _close_channel($client_channel, $want_reply = false) @@ -3696,8 +3696,8 @@ class Net_SSH2 /** * Disconnect * - * @param Integer $reason - * @return Boolean + * @param int $reason + * @return bool * @access private */ function _disconnect($reason) @@ -3716,9 +3716,9 @@ class Net_SSH2 * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) @@ -3735,7 +3735,7 @@ class Net_SSH2 * 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. * - * @param Array $array + * @param array $array * @access private */ function _define_array() @@ -3758,7 +3758,7 @@ class Net_SSH2 * Returns a string if NET_SSH2_LOGGING == NET_SSH2_LOG_COMPLEX, an array if NET_SSH2_LOGGING == NET_SSH2_LOG_SIMPLE and false if !defined('NET_SSH2_LOGGING') * * @access public - * @return String or Array + * @return string or Array */ function getLog() { @@ -3781,10 +3781,10 @@ class Net_SSH2 /** * Formats a log for printing * - * @param Array $message_log - * @param Array $message_number_log + * @param array $message_log + * @param array $message_number_log * @access private - * @return String + * @return string */ function _format_log($message_log, $message_number_log) { @@ -3817,9 +3817,9 @@ class Net_SSH2 * * For use with preg_replace_callback() * - * @param Array $matches + * @param array $matches * @access private - * @return String + * @return string */ function _format_log_helper($matches) { @@ -3846,9 +3846,9 @@ class Net_SSH2 * Returns the first value of the intersection of two arrays or false if * the intersection is empty. The order is defined by the first parameter. * - * @param Array $array1 - * @param Array $array2 - * @return Mixed False if intersection is empty, else intersected value. + * @param array $array1 + * @param array $array2 + * @return mixed False if intersection is empty, else intersected value. * @access private */ function _array_intersect_first($array1, $array2) @@ -3864,7 +3864,7 @@ class Net_SSH2 /** * Returns all errors * - * @return String + * @return string * @access public */ function getErrors() @@ -3875,7 +3875,7 @@ class Net_SSH2 /** * Returns the last error * - * @return String + * @return string * @access public */ function getLastError() @@ -3886,7 +3886,7 @@ class Net_SSH2 /** * Return the server identification. * - * @return String + * @return string * @access public */ function getServerIdentification() @@ -3899,7 +3899,7 @@ class Net_SSH2 /** * Return a list of the key exchange algorithms the server supports. * - * @return Array + * @return array * @access public */ function getKexAlgorithms() @@ -3912,7 +3912,7 @@ class Net_SSH2 /** * Return a list of the host key (public key) algorithms the server supports. * - * @return Array + * @return array * @access public */ function getServerHostKeyAlgorithms() @@ -3925,7 +3925,7 @@ class Net_SSH2 /** * Return a list of the (symmetric key) encryption algorithms the server supports, when receiving stuff from the client. * - * @return Array + * @return array * @access public */ function getEncryptionAlgorithmsClient2Server() @@ -3938,7 +3938,7 @@ class Net_SSH2 /** * Return a list of the (symmetric key) encryption algorithms the server supports, when sending stuff to the client. * - * @return Array + * @return array * @access public */ function getEncryptionAlgorithmsServer2Client() @@ -3951,7 +3951,7 @@ class Net_SSH2 /** * Return a list of the MAC algorithms the server supports, when receiving stuff from the client. * - * @return Array + * @return array * @access public */ function getMACAlgorithmsClient2Server() @@ -3964,7 +3964,7 @@ class Net_SSH2 /** * Return a list of the MAC algorithms the server supports, when sending stuff to the client. * - * @return Array + * @return array * @access public */ function getMACAlgorithmsServer2Client() @@ -3977,7 +3977,7 @@ class Net_SSH2 /** * Return a list of the compression algorithms the server supports, when receiving stuff from the client. * - * @return Array + * @return array * @access public */ function getCompressionAlgorithmsClient2Server() @@ -3990,7 +3990,7 @@ class Net_SSH2 /** * Return a list of the compression algorithms the server supports, when sending stuff to the client. * - * @return Array + * @return array * @access public */ function getCompressionAlgorithmsServer2Client() @@ -4003,7 +4003,7 @@ class Net_SSH2 /** * Return a list of the languages the server supports, when sending stuff to the client. * - * @return Array + * @return array * @access public */ function getLanguagesServer2Client() @@ -4016,7 +4016,7 @@ class Net_SSH2 /** * Return a list of the languages the server supports, when receiving stuff from the client. * - * @return Array + * @return array * @access public */ function getLanguagesClient2Server() @@ -4032,7 +4032,7 @@ class Net_SSH2 * Quoting from the RFC, "in some jurisdictions, sending a warning message before * authentication may be relevant for getting legal protection." * - * @return String + * @return string * @access public */ function getBannerMessage() @@ -4046,7 +4046,7 @@ class Net_SSH2 * Caching this the first time you connect to a server and checking the result on subsequent connections * is recommended. Returns false if the server signature is not signed correctly with the public host key. * - * @return Mixed + * @return mixed * @access public */ function getServerPublicHostKey() @@ -4191,7 +4191,7 @@ class Net_SSH2 /** * Returns the exit status of an SSH command or false. * - * @return Integer or false + * @return int or false * @access public */ function getExitStatus() @@ -4205,7 +4205,7 @@ class Net_SSH2 /** * Returns the number of columns for the terminal window size. * - * @return Integer + * @return int * @access public */ function getWindowColumns() @@ -4216,7 +4216,7 @@ class Net_SSH2 /** * Returns the number of rows for the terminal window size. * - * @return Integer + * @return int * @access public */ function getWindowRows() @@ -4227,7 +4227,7 @@ class Net_SSH2 /** * Sets the number of columns for the terminal window size. * - * @param Integer $value + * @param int $value * @access public */ function setWindowColumns($value) @@ -4238,7 +4238,7 @@ class Net_SSH2 /** * Sets the number of rows for the terminal window size. * - * @param Integer $value + * @param int $value * @access public */ function setWindowRows($value) @@ -4249,8 +4249,8 @@ class Net_SSH2 /** * Sets the number of columns and rows for the terminal window size. * - * @param Integer $columns - * @param Integer $rows + * @param int $columns + * @param int $rows * @access public */ function setWindowSize($columns = 80, $rows = 24) diff --git a/phpseclib/System/SSH/Agent.php b/phpseclib/System/SSH/Agent.php index ea6d55bf..0cfe6976 100644 --- a/phpseclib/System/SSH/Agent.php +++ b/phpseclib/System/SSH/Agent.php @@ -108,7 +108,7 @@ class System_SSH_Agent_Identity /** * Key Blob * - * @var String + * @var string * @access private * @see System_SSH_Agent_Identity::sign() */ @@ -117,7 +117,7 @@ class System_SSH_Agent_Identity /** * Socket Resource * - * @var Resource + * @var resource * @access private * @see System_SSH_Agent_Identity::sign() */ @@ -126,7 +126,7 @@ class System_SSH_Agent_Identity /** * Default Constructor. * - * @param Resource $fsock + * @param resource $fsock * @return System_SSH_Agent_Identity * @access private */ @@ -155,7 +155,7 @@ class System_SSH_Agent_Identity * Called by System_SSH_Agent::requestIdentities(). The key blob could be extracted from $this->key * but this saves a small amount of computation. * - * @param String $key_blob + * @param string $key_blob * @access private */ function setPublicKeyBlob($key_blob) @@ -168,8 +168,8 @@ class System_SSH_Agent_Identity * * Wrapper for $this->key->getPublicKey() * - * @param Integer $format optional - * @return Mixed + * @param int $format optional + * @return mixed * @access public */ function getPublicKey($format = null) @@ -183,7 +183,7 @@ class System_SSH_Agent_Identity * 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 CRYPT_RSA_SIGNATURE_PKCS1 * - * @param Integer $mode + * @param int $mode * @access public */ function setSignatureMode($mode) @@ -195,8 +195,8 @@ class System_SSH_Agent_Identity * * See "2.6.2 Protocol 2 private key signature request" * - * @param String $message - * @return String + * @param string $message + * @return string * @access public */ function sign($message) @@ -235,7 +235,7 @@ class System_SSH_Agent /** * Socket Resource * - * @var Resource + * @var resource * @access private */ var $fsock; @@ -295,7 +295,7 @@ class System_SSH_Agent * See "2.5.2 Requesting a list of protocol 2 keys" * Returns an array containing zero or more System_SSH_Agent_Identity objects * - * @return Array + * @return array * @access public */ function requestIdentities() @@ -354,7 +354,7 @@ class System_SSH_Agent * be requested when a channel is opened * * @param Net_SSH2 $ssh - * @return Boolean + * @return bool * @access public */ function startSSHForwarding($ssh) @@ -368,7 +368,7 @@ class System_SSH_Agent * Request agent forwarding of remote server * * @param Net_SSH2 $ssh - * @return Boolean + * @return bool * @access private */ function _request_forwarding($ssh) @@ -424,7 +424,7 @@ class System_SSH_Agent /** * Forward data to SSH Agent and return data reply * - * @param String $data + * @param string $data * @return data from SSH Agent * @access private */ From c08c099c56863d5cbfb22b5042283af241d5a4fe Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 2 Sep 2015 00:41:38 +0100 Subject: [PATCH 3/4] Fixed invalid param phpdoc --- phpseclib/Crypt/Base.php | 8 +++---- phpseclib/Crypt/Hash.php | 6 ++--- phpseclib/Crypt/RSA.php | 8 +++---- phpseclib/Crypt/Rijndael.php | 2 +- phpseclib/Crypt/TripleDES.php | 2 +- phpseclib/File/ASN1.php | 6 ++--- phpseclib/Math/BigInteger.php | 12 +++++----- phpseclib/Net/SCP.php | 10 ++++----- phpseclib/Net/SFTP.php | 42 +++++++++++++++++------------------ phpseclib/Net/SFTP/Stream.php | 2 +- phpseclib/Net/SSH1.php | 22 +++++++++--------- phpseclib/Net/SSH2.php | 12 +++++----- 12 files changed, 66 insertions(+), 66 deletions(-) diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index 715ab2a5..dadb0940 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -461,7 +461,7 @@ abstract class Base * * If not explicitly set, self::MODE_CBC will be used. * - * @param optional Integer $mode + * @param Integer $mode * @access public */ function __construct($mode = self::MODE_CBC) @@ -544,7 +544,7 @@ abstract class Base * * @see Crypt/Hash.php * @param String $password - * @param optional String $method + * @param String $method * @return Boolean * @access public * @internal Could, but not must, extend by the child Crypt_* class @@ -1840,7 +1840,7 @@ abstract class Base * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @access private * @return String */ @@ -1857,7 +1857,7 @@ abstract class Base * Inspired by array_pop * * @param String $string - * @param optional Integer $index + * @param Integer $index * @access private * @return String */ diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index 14b8a32a..38750e9b 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -133,7 +133,7 @@ class Hash /** * Default Constructor. * - * @param optional String $hash + * @param String $hash * @return \phpseclib\Crypt\Hash * @access public */ @@ -161,7 +161,7 @@ class Hash * Keys can be of any length. * * @access public - * @param optional String $key + * @param String $key */ function setKey($key = false) { @@ -812,7 +812,7 @@ class Hash * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 78837ddf..283bfb93 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -537,9 +537,9 @@ class RSA * Will need to be passed back to \phpseclib\Crypt\RSA::createKey() as the third parameter for further processing. * * @access public - * @param optional Integer $bits - * @param optional Integer $timeout - * @param optional array $p + * @param Integer $bits + * @param Integer $timeout + * @param array $p */ function createKey($bits = 1024, $timeout = false, $partial = array()) { @@ -1942,7 +1942,7 @@ class RSA * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index 90c75d83..10c9c891 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -209,7 +209,7 @@ class Rijndael extends Base * If not explictly set, \phpseclib\Crypt\Base::MODE_CBC will be used. * * @see \phpseclib\Crypt\Base::Crypt_Base() - * @param optional Integer $mode + * @param Integer $mode * @access public /** diff --git a/phpseclib/Crypt/TripleDES.php b/phpseclib/Crypt/TripleDES.php index d4caa398..84921319 100644 --- a/phpseclib/Crypt/TripleDES.php +++ b/phpseclib/Crypt/TripleDES.php @@ -154,7 +154,7 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\DES::__construct() * @see \phpseclib\Crypt\Base::__construct() - * @param optional Integer $mode + * @param Integer $mode * @access public */ function __construct($mode = Base::MODE_CBC) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 717f4f8d..3435c8e2 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -1196,7 +1196,7 @@ class ASN1 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ @@ -1214,8 +1214,8 @@ class ASN1 * No real conversion table is used. * * @param String $in - * @param optional Integer $from - * @param optional Integer $to + * @param Integer $from + * @param Integer $to * @return String * @access public */ diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index bc7b2269..efd0a71c 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -251,8 +251,8 @@ class BigInteger * ?> * * - * @param optional $x base-10 number or base-$base number if $base set. - * @param optional integer $base + * @param $x base-10 number or base-$base number if $base set. + * @param integer $base * @return \phpseclib\Math\BigInteger * @access public */ @@ -3076,7 +3076,7 @@ class BigInteger * $max->random($min) * * @param \phpseclib\Math\BigInteger $arg1 - * @param optional \phpseclib\Math\BigInteger $arg2 + * @param \phpseclib\Math\BigInteger $arg2 * @return \phpseclib\Math\BigInteger * @access public * @internal The API for creating random numbers used to be $a->random($min, $max), where $a was a BigInteger object. @@ -3157,8 +3157,8 @@ class BigInteger * give up and return false. * * @param \phpseclib\Math\BigInteger $arg1 - * @param optional \phpseclib\Math\BigInteger $arg2 - * @param optional Integer $timeout + * @param \phpseclib\Math\BigInteger $arg2 + * @param Integer $timeout * @return Mixed * @access public * @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap4.pdf#page=15 HAC 4.44}. @@ -3286,7 +3286,7 @@ class BigInteger * $t parameter is distributability. BigInteger::randomPrime() can be distributed across multiple pageloads * on a website instead of just one. * - * @param optional \phpseclib\Math\BigInteger $t + * @param \phpseclib\Math\BigInteger $t * @return Boolean * @access public * @internal Uses the diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index 678297e0..3e94a62f 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -103,8 +103,8 @@ class SCP * Connects to an SSH server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @return \phpseclib\Net\SCP * @access public */ @@ -138,8 +138,8 @@ class SCP * * @param String $remote_file * @param String $data - * @param optional Integer $mode - * @param optional Callable $callback + * @param Integer $mode + * @param Callable $callback * @return Boolean * @access public */ @@ -213,7 +213,7 @@ class SCP * operation * * @param String $remote_file - * @param optional String $local_file + * @param String $local_file * @return Mixed * @access public */ diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 60d8923d..89c3d31d 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -244,8 +244,8 @@ class SFTP extends SSH2 * Connects to an SFTP server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @return \phpseclib\Net\SFTP * @access public */ @@ -382,7 +382,7 @@ class SFTP extends SSH2 * Login * * @param String $username - * @param optional String $password + * @param String $password * @return Boolean * @access public */ @@ -583,7 +583,7 @@ class SFTP extends SSH2 * Logs errors * * @param String $response - * @param optional Integer $status + * @param Integer $status * @access public */ function _logError($response, $status = -1) @@ -727,8 +727,8 @@ class SFTP extends SSH2 /** * Returns a list of files in the given directory * - * @param optional String $dir - * @param optional Boolean $recursive + * @param String $dir + * @param Boolean $recursive * @return Mixed * @access public */ @@ -776,8 +776,8 @@ class SFTP extends SSH2 /** * Returns a detailed list of files in the given directory * - * @param optional String $dir - * @param optional Boolean $recursive + * @param String $dir + * @param Boolean $recursive * @return Mixed * @access public */ @@ -811,7 +811,7 @@ class SFTP extends SSH2 * Reads a list, be it detailed or not, of files in the given directory * * @param String $dir - * @param optional Boolean $raw + * @param Boolean $raw * @return Mixed * @access private */ @@ -1304,8 +1304,8 @@ class SFTP extends SSH2 * If the file does not exist, it will be created. * * @param String $filename - * @param optional Integer $time - * @param optional Integer $atime + * @param Integer $time + * @param Integer $atime * @return Boolean * @access public */ @@ -1356,7 +1356,7 @@ class SFTP extends SSH2 * * @param String $filename * @param Integer $uid - * @param optional Boolean $recursive + * @param Boolean $recursive * @return Boolean * @access public */ @@ -1376,7 +1376,7 @@ class SFTP extends SSH2 * * @param String $filename * @param Integer $gid - * @param optional Boolean $recursive + * @param Boolean $recursive * @return Boolean * @access public */ @@ -1395,7 +1395,7 @@ class SFTP extends SSH2 * * @param Integer $mode * @param String $filename - * @param optional Boolean $recursive + * @param Boolean $recursive * @return Mixed * @access public */ @@ -1790,10 +1790,10 @@ class SFTP extends SSH2 * * @param String $remote_file * @param String|resource $data - * @param optional Integer $mode - * @param optional Integer $start - * @param optional Integer $local_start - * @param optional callable|null $progressCallback + * @param Integer $mode + * @param Integer $start + * @param Integer $local_start + * @param callable|null $progressCallback * @return Boolean * @access public * @internal ASCII mode for SFTPv4/5/6 can be supported by adding a new function - \phpseclib\Net\SFTP::setMode(). @@ -2011,9 +2011,9 @@ class SFTP extends SSH2 * $offset and $length can be used to download files in chunks. * * @param String $remote_file - * @param optional String $local_file - * @param optional Integer $offset - * @param optional Integer $length + * @param String $local_file + * @param Integer $offset + * @param Integer $length * @return Mixed * @access public */ diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index 2758e73c..403c1d03 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -115,7 +115,7 @@ class Stream /** * 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. * @access public */ diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index 918c791e..15e37061 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -498,9 +498,9 @@ class SSH1 * Connects to an SSHv1 server * * @param String $host - * @param optional Integer $port - * @param optional Integer $timeout - * @param optional Integer $cipher + * @param Integer $port + * @param Integer $timeout + * @param Integer $cipher * @return \phpseclib\Net\SSH1 * @access public */ @@ -695,7 +695,7 @@ class SSH1 * Login * * @param String $username - * @param optional String $password + * @param String $password * @return Boolean * @access public */ @@ -1285,7 +1285,7 @@ class SSH1 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ @@ -1451,7 +1451,7 @@ class SSH1 * 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. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1466,7 +1466,7 @@ class SSH1 * 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. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1481,7 +1481,7 @@ class SSH1 * 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. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1496,7 +1496,7 @@ class SSH1 * 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. * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return String * @access public */ @@ -1512,7 +1512,7 @@ class SSH1 * 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). * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return Array * @access public */ @@ -1528,7 +1528,7 @@ class SSH1 * is set to true, returns, instead, an array of constants. ie. instead of array('password authentication'), you'll * get array(self::AUTH_PASSWORD). * - * @param optional Boolean $raw_output + * @param Boolean $raw_output * @return Array * @access public */ diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 210af478..48e9c9de 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -872,8 +872,8 @@ class SSH2 * $host can either be a string, representing the host, or a stream resource. * * @param Mixed $host - * @param optional Integer $port - * @param optional Integer $timeout + * @param Integer $port + * @param Integer $timeout * @see \phpseclib\Net\SSH2::login() * @return \phpseclib\Net\SSH2 * @access public @@ -1889,7 +1889,7 @@ class SSH2 * Login Helper * * @param String $username - * @param optional String $password + * @param String $password * @return Boolean * @access private * @internal It might be worthwhile, at some point, to protect against {@link http://tools.ietf.org/html/rfc4251#section-9.3.9 traffic analysis} @@ -2361,7 +2361,7 @@ class SSH2 * In all likelihood, this is not a feature you want to be taking advantage of. * * @param String $command - * @param optional Callback $callback + * @param Callback $callback * @return String * @access public */ @@ -3376,7 +3376,7 @@ class SSH2 * See '6. Binary Packet Protocol' of rfc4253 for more info. * * @param String $data - * @param optional String $logged + * @param String $logged * @see \phpseclib\Net\SSH2::_get_binary_packet() * @return Boolean * @access private @@ -3615,7 +3615,7 @@ class SSH2 * Inspired by array_shift * * @param String $string - * @param optional Integer $index + * @param Integer $index * @return String * @access private */ From 634c1c2a188b74aec2b8b9f9043a86d868b33da0 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 2 Sep 2015 00:42:15 +0100 Subject: [PATCH 4/4] Fixed lots of phpdoc typos --- phpseclib/Crypt/AES.php | 6 +- phpseclib/Crypt/Base.php | 136 ++++---- phpseclib/Crypt/Blowfish.php | 24 +- phpseclib/Crypt/DES.php | 60 ++-- phpseclib/Crypt/Hash.php | 64 ++-- phpseclib/Crypt/RC2.php | 48 +-- phpseclib/Crypt/RC4.php | 36 +-- phpseclib/Crypt/RSA.php | 242 +++++++-------- phpseclib/Crypt/Random.php | 4 +- phpseclib/Crypt/Rijndael.php | 50 +-- phpseclib/Crypt/TripleDES.php | 36 +-- phpseclib/Crypt/Twofish.php | 44 +-- phpseclib/File/ANSI.php | 52 ++-- phpseclib/File/ASN1.php | 76 ++--- phpseclib/File/ASN1/Element.php | 4 +- phpseclib/File/X509.php | 396 ++++++++++++------------ phpseclib/Math/BigInteger.php | 230 +++++++------- phpseclib/Net/SCP.php | 32 +- phpseclib/Net/SFTP.php | 336 ++++++++++---------- phpseclib/Net/SFTP/Stream.php | 138 ++++----- phpseclib/Net/SSH1.php | 144 ++++----- phpseclib/Net/SSH2.php | 312 +++++++++---------- phpseclib/System/SSH/Agent.php | 10 +- phpseclib/System/SSH/Agent/Identity.php | 18 +- 24 files changed, 1249 insertions(+), 1249 deletions(-) diff --git a/phpseclib/Crypt/AES.php b/phpseclib/Crypt/AES.php index 2696e0ab..6f0a66ec 100644 --- a/phpseclib/Crypt/AES.php +++ b/phpseclib/Crypt/AES.php @@ -67,7 +67,7 @@ class AES extends Rijndael * * @see \phpseclib\Crypt\Rijndael::setBlockLength() * @access public - * @param Integer $length + * @param int $length */ function setBlockLength($length) { @@ -82,7 +82,7 @@ class AES extends Rijndael * * @see \phpseclib\Crypt\Rijndael:setKeyLength() * @access public - * @param Integer $length + * @param int $length */ function setKeyLength($length) { @@ -104,7 +104,7 @@ class AES extends Rijndael * @see \phpseclib\Crypt\Rijndael:setKey() * @see setKeyLength() * @access public - * @param String $key + * @param string $key */ function setKey($key) { diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index dadb0940..3f1b349e 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -94,7 +94,7 @@ abstract class Base * Whirlpool available flag * * @see \phpseclib\Crypt\Base::_hashInlineCryptFunction() - * @var Boolean + * @var bool * @access private */ static $WHIRLPOOL_AVAILABLE; @@ -121,7 +121,7 @@ abstract class Base * The Encryption Mode * * @see \phpseclib\Crypt\Base::__construct() - * @var Integer + * @var int * @access private */ var $mode; @@ -129,7 +129,7 @@ abstract class Base /** * The Block Length of the block cipher * - * @var Integer + * @var int * @access private */ var $block_size = 16; @@ -138,7 +138,7 @@ abstract class Base * The Key * * @see \phpseclib\Crypt\Base::setKey() - * @var String + * @var string * @access private */ 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 * * @see \phpseclib\Crypt\Base::setIV() - * @var String + * @var string * @access private */ var $iv; @@ -157,7 +157,7 @@ abstract class Base * * @see \phpseclib\Crypt\Base::enableContinuousBuffer() * @see \phpseclib\Crypt\Base::_clearBuffers() - * @var String + * @var string * @access private */ var $encryptIV; @@ -167,7 +167,7 @@ abstract class Base * * @see \phpseclib\Crypt\Base::enableContinuousBuffer() * @see \phpseclib\Crypt\Base::_clearBuffers() - * @var String + * @var string * @access private */ var $decryptIV; @@ -176,7 +176,7 @@ abstract class Base * Continuous Buffer status * * @see \phpseclib\Crypt\Base::enableContinuousBuffer() - * @var Boolean + * @var bool * @access private */ var $continuousBuffer = false; @@ -186,7 +186,7 @@ abstract class Base * * @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::_clearBuffers() - * @var Array + * @var array * @access private */ var $enbuffer; @@ -196,7 +196,7 @@ abstract class Base * * @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::_clearBuffers() - * @var Array + * @var array * @access private */ 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. * * @see \phpseclib\Crypt\Base::encrypt() - * @var Resource + * @var resource * @access private */ 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. * * @see \phpseclib\Crypt\Base::decrypt() - * @var Resource + * @var resource * @access private */ var $demcrypt; @@ -230,7 +230,7 @@ abstract class Base * * @see \phpseclib\Crypt\Twofish::setKey() * @see \phpseclib\Crypt\Twofish::setIV() - * @var Boolean + * @var bool * @access private */ var $enchanged = true; @@ -240,7 +240,7 @@ abstract class Base * * @see \phpseclib\Crypt\Twofish::setKey() * @see \phpseclib\Crypt\Twofish::setIV() - * @var Boolean + * @var bool * @access private */ var $dechanged = true; @@ -259,7 +259,7 @@ abstract class Base * @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::_setupMcrypt() - * @var Resource + * @var resource * @access private */ var $ecb; @@ -281,7 +281,7 @@ abstract class Base * on its internaly Key-expanding algorithm. * * @see \phpseclib\Crypt\Base::encrypt() - * @var Integer + * @var int * @access private */ var $cfb_init_len = 600; @@ -292,7 +292,7 @@ abstract class Base * @see setKey() * @see setIV() * @see disableContinuousBuffer() - * @var Boolean + * @var bool * @access private */ var $changed = true; @@ -301,7 +301,7 @@ abstract class Base * Padding status * * @see \phpseclib\Crypt\Base::enablePadding() - * @var Boolean + * @var bool * @access private */ var $padding = true; @@ -310,7 +310,7 @@ abstract class Base * Is the mode one that is paddable? * * @see \phpseclib\Crypt\Base::__construct() - * @var Boolean + * @var bool * @access private */ var $paddable = false; @@ -327,7 +327,7 @@ abstract class Base * @see \phpseclib\Crypt\Base::_setEngine() * @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::decrypt() - * @var Integer + * @var int * @access private */ var $engine; @@ -337,7 +337,7 @@ abstract class Base * * @see \phpseclib\Crypt\Base::_setEngine() * @see \phpseclib\Crypt\Base::setPreferredEngine() - * @var Integer + * @var int * @access private */ var $preferredEngine; @@ -350,7 +350,7 @@ abstract class Base * @link http://www.php.net/mcrypt_module_open * @link http://www.php.net/mcrypt_list_algorithms * @see \phpseclib\Crypt\Base::_setupMcrypt() - * @var String + * @var string * @access private */ var $cipher_name_mcrypt; @@ -361,7 +361,7 @@ abstract class Base * Only used if $engine == CRYPT_ENGINE_OPENSSL * * @link http://www.php.net/openssl-get-cipher-methods - * @var String + * @var string * @access private */ var $cipher_name_openssl; @@ -373,7 +373,7 @@ abstract class Base * it can still be emulated with ECB mode. * * @link http://www.php.net/openssl-get-cipher-methods - * @var String + * @var string * @access private */ var $cipher_name_openssl_ecb; @@ -382,7 +382,7 @@ abstract class Base * The default password key_size used by setPassword() * * @see \phpseclib\Crypt\Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 32; @@ -391,7 +391,7 @@ abstract class Base * The default salt used by setPassword() * * @see \phpseclib\Crypt\Base::setPassword() - * @var String + * @var string * @access private */ 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 * * @see \phpseclib\Crypt\Base::_openssl_ctr_process() - * @var Boolean + * @var bool * @access private */ var $openssl_emulate_ctr = false; @@ -461,7 +461,7 @@ abstract class Base * * If not explicitly set, self::MODE_CBC will be used. * - * @param Integer $mode + * @param int $mode * @access public */ function __construct($mode = self::MODE_CBC) @@ -499,7 +499,7 @@ abstract class Base * to be all zero's. * * @access public - * @param String $iv + * @param string $iv * @internal Can be overwritten by a sub class, but does not have to be */ 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. * * @access public - * @param String $key + * @param string $key * @internal Could, but not must, extend by the child Crypt_* class */ function setKey($key) @@ -543,9 +543,9 @@ abstract class Base * Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php * * @see Crypt/Hash.php - * @param String $password - * @param String $method - * @return Boolean + * @param string $password + * @param string $method + * @return bool * @access public * @internal Could, but not must, extend by the child Crypt_* class */ @@ -636,8 +636,8 @@ abstract class Base * * @see \phpseclib\Crypt\Base::decrypt() * @access public - * @param String $plaintext - * @return String $ciphertext + * @param string $plaintext + * @return string $ciphertext * @internal Could, but not must, extend by the child Crypt_* class */ function encrypt($plaintext) @@ -934,8 +934,8 @@ abstract class Base * * @see \phpseclib\Crypt\Base::encrypt() * @access public - * @param String $ciphertext - * @return String $plaintext + * @param string $ciphertext + * @return string $plaintext * @internal Could, but not must, extend by the child Crypt_* class */ function decrypt($ciphertext) @@ -1225,10 +1225,10 @@ abstract class Base * * @see Crypt_Base::encrypt() * @see Crypt_Base::decrypt() - * @param String $plaintext - * @param String $encryptIV - * @param Array $buffer - * @return String + * @param string $plaintext + * @param string $encryptIV + * @param array $buffer + * @return string * @access private */ function _openssl_ctr_process($plaintext, &$encryptIV, &$buffer) @@ -1319,10 +1319,10 @@ abstract class Base * * @see Crypt_Base::encrypt() * @see Crypt_Base::decrypt() - * @param String $plaintext - * @param String $encryptIV - * @param Array $buffer - * @return String + * @param string $plaintext + * @param string $encryptIV + * @param array $buffer + * @return string * @access private */ 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 * - * @return Integer + * @return int * @access private */ function _openssl_translate_mode() @@ -1495,9 +1495,9 @@ abstract class Base * Test for engine validity * * @see \phpseclib\Crypt\Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ 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 * * @see \phpseclib\Crypt\Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public */ function setPreferredEngine($engine) @@ -1639,8 +1639,8 @@ abstract class Base * Note: Must be extended by the child \phpseclib\Crypt\* class * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ abstract function _encryptBlock($in); @@ -1650,8 +1650,8 @@ abstract class Base * Note: Must be extended by the child \phpseclib\Crypt\* class * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ abstract function _decryptBlock($in); @@ -1767,9 +1767,9 @@ abstract class Base * and padding will, hence forth, be enabled. * * @see \phpseclib\Crypt\Base::_unpad() - * @param String $text + * @param string $text * @access private - * @return String + * @return string */ function _pad($text) { @@ -1796,9 +1796,9 @@ abstract class Base * and false will be returned. * * @see \phpseclib\Crypt\Base::_pad() - * @param String $text + * @param string $text * @access private - * @return String + * @return string */ function _unpad($text) { @@ -1839,10 +1839,10 @@ abstract class Base * * Inspired by array_shift * - * @param String $string - * @param Integer $index + * @param string $string + * @param int $index * @access private - * @return String + * @return string */ function _string_shift(&$string, $index = 1) { @@ -1856,10 +1856,10 @@ abstract class Base * * Inspired by array_pop * - * @param String $string - * @param Integer $index + * @param string $string + * @param int $index * @access private - * @return String + * @return string */ function _string_pop(&$string, $index = 1) { @@ -1873,7 +1873,7 @@ abstract class Base * * @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\Base::encrypt() - * @param String $var + * @param string $var * @access private */ function _increment_str(&$var) @@ -2083,9 +2083,9 @@ abstract class Base * @see \phpseclib\Crypt\Base::_setupInlineCrypt() * @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\Base::decrypt() - * @param Array $cipher_code + * @param array $cipher_code * @access private - * @return String (the name of the created callback function) + * @return string (the name of the created callback function) */ function _createInlineCryptFunction($cipher_code) { @@ -2452,7 +2452,7 @@ abstract class Base * for which $mode the lambda function was created. * * @access private - * @return Array &$functions + * @return array &$functions */ function &_getLambdaFunctions() { @@ -2466,7 +2466,7 @@ abstract class Base * @see _setupInlineCrypt() * @access private * @param $bytes - * @return String + * @return string */ function _hashInlineCryptFunction($bytes) { diff --git a/phpseclib/Crypt/Blowfish.php b/phpseclib/Crypt/Blowfish.php index 9844bafa..bc645ae5 100644 --- a/phpseclib/Crypt/Blowfish.php +++ b/phpseclib/Crypt/Blowfish.php @@ -53,7 +53,7 @@ class Blowfish extends Base * Block Length of the cipher * * @see \phpseclib\Crypt\Base::block_size - * @var Integer + * @var int * @access private */ var $block_size = 8; @@ -63,7 +63,7 @@ class Blowfish extends Base * * @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 56; @@ -72,7 +72,7 @@ class Blowfish extends Base * The mcrypt specific name of the cipher * * @see \phpseclib\Crypt\Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'blowfish'; @@ -81,7 +81,7 @@ class Blowfish extends Base * Optimizing value while CFB-encrypting * * @see \phpseclib\Crypt\Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 500; @@ -277,7 +277,7 @@ class Blowfish extends Base /** * Holds the last used key * - * @var Array + * @var array * @access private */ var $kl; @@ -295,7 +295,7 @@ class Blowfish extends Base * * @access public * @see \phpseclib\Crypt\Base::setKey() - * @param String $key + * @param string $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() * * @see \phpseclib\Crypt\Base::isValidEngine() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -393,8 +393,8 @@ class Blowfish extends Base * Encrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -429,8 +429,8 @@ class Blowfish extends Base * Decrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { diff --git a/phpseclib/Crypt/DES.php b/phpseclib/Crypt/DES.php index d748f1a5..28415b4d 100644 --- a/phpseclib/Crypt/DES.php +++ b/phpseclib/Crypt/DES.php @@ -72,7 +72,7 @@ class DES extends Base * Block Length of the cipher * * @see \phpseclib\Crypt\Base::block_size - * @var Integer + * @var int * @access private */ var $block_size = 8; @@ -82,7 +82,7 @@ class DES extends Base * * @see \phpseclib\Crypt\Base::key * @see setKey() - * @var String + * @var string * @access private */ 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::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 8; @@ -101,7 +101,7 @@ class DES extends Base * The mcrypt specific name of the cipher * * @see \phpseclib\Crypt\Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'des'; @@ -110,7 +110,7 @@ class DES extends Base * The OpenSSL names of the cipher / modes * * @see \phpseclib\Crypt\Base::openssl_mode_names - * @var Array + * @var array * @access private */ var $openssl_mode_names = array( @@ -125,7 +125,7 @@ class DES extends Base * Optimizing value while CFB-encrypting * * @see \phpseclib\Crypt\Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 500; @@ -137,7 +137,7 @@ class DES extends Base * * @see \phpseclib\Crypt\DES::_setupKey() * @see \phpseclib\Crypt\DES::_processBlock() - * @var Integer + * @var int * @access private */ var $des_rounds = 1; @@ -146,7 +146,7 @@ class DES extends Base * max possible size of $key * * @see \phpseclib\Crypt\DES::setKey() - * @var String + * @var string * @access private */ var $key_size_max = 8; @@ -155,7 +155,7 @@ class DES extends Base * The Key Schedule * * @see \phpseclib\Crypt\DES::_setupKey() - * @var Array + * @var array * @access private */ var $keys; @@ -169,7 +169,7 @@ class DES extends Base * * @see \phpseclib\Crypt\DES::_processBlock() * @see \phpseclib\Crypt\DES::_setupKey() - * @var Array + * @var array * @access private */ var $shuffle = array( @@ -308,7 +308,7 @@ class DES extends Base * * Indexing this table with each source byte performs the initial bit permutation. * - * @var Array + * @var array * @access private */ var $ipmap = array( @@ -350,7 +350,7 @@ class DES extends Base * Inverse IP mapping helper table. * Indexing this table with a byte value reverses the bit order. * - * @var Array + * @var array * @access private */ 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 * P table: concatenation can then be replaced by exclusive ORs. * - * @var Array + * @var array * @access private */ var $sbox1 = array( @@ -419,7 +419,7 @@ class DES extends Base /** * Pre-permuted S-box2 * - * @var Array + * @var array * @access private */ var $sbox2 = array( @@ -444,7 +444,7 @@ class DES extends Base /** * Pre-permuted S-box3 * - * @var Array + * @var array * @access private */ var $sbox3 = array( @@ -469,7 +469,7 @@ class DES extends Base /** * Pre-permuted S-box4 * - * @var Array + * @var array * @access private */ var $sbox4 = array( @@ -494,7 +494,7 @@ class DES extends Base /** * Pre-permuted S-box5 * - * @var Array + * @var array * @access private */ var $sbox5 = array( @@ -519,7 +519,7 @@ class DES extends Base /** * Pre-permuted S-box6 * - * @var Array + * @var array * @access private */ var $sbox6 = array( @@ -544,7 +544,7 @@ class DES extends Base /** * Pre-permuted S-box7 * - * @var Array + * @var array * @access private */ var $sbox7 = array( @@ -569,7 +569,7 @@ class DES extends Base /** * Pre-permuted S-box8 * - * @var Array + * @var array * @access private */ 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() * * @see \phpseclib\Crypt\Base::isValidEngine() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -626,7 +626,7 @@ class DES extends Base * * @see \phpseclib\Crypt\Base::setKey() * @access public - * @param String $key + * @param string $key */ function setKey($key) { @@ -647,8 +647,8 @@ class DES extends Base * @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\DES::encrypt() * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -662,8 +662,8 @@ class DES extends Base * @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\DES::decrypt() * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { @@ -680,9 +680,9 @@ class DES extends Base * @see \phpseclib\Crypt\DES::_encryptBlock() * @see \phpseclib\Crypt\DES::_decryptBlock() * @access private - * @param String $block - * @param Integer $mode - * @return String + * @param string $block + * @param int $mode + * @return string */ function _processBlock($block, $mode) { diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index 38750e9b..42f93f5a 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -71,7 +71,7 @@ class Hash * Hash Parameter * * @see \phpseclib\Crypt\Hash::setHash() - * @var Integer + * @var int * @access private */ var $hashParam; @@ -80,7 +80,7 @@ class Hash * Byte-length of compression blocks / key (Internal HMAC) * * @see \phpseclib\Crypt\Hash::setAlgorithm() - * @var Integer + * @var int * @access private */ var $b; @@ -89,7 +89,7 @@ class Hash * Byte-length of hash output (Internal HMAC) * * @see \phpseclib\Crypt\Hash::setHash() - * @var Integer + * @var int * @access private */ var $l = false; @@ -98,7 +98,7 @@ class Hash * Hash Algorithm * * @see \phpseclib\Crypt\Hash::setHash() - * @var String + * @var string * @access private */ var $hash; @@ -107,7 +107,7 @@ class Hash * Key * * @see \phpseclib\Crypt\Hash::setKey() - * @var String + * @var string * @access private */ var $key = false; @@ -116,7 +116,7 @@ class Hash * Outer XOR (Internal HMAC) * * @see \phpseclib\Crypt\Hash::setKey() - * @var String + * @var string * @access private */ var $opad; @@ -125,7 +125,7 @@ class Hash * Inner XOR (Internal HMAC) * * @see \phpseclib\Crypt\Hash::setKey() - * @var String + * @var string * @access private */ var $ipad; @@ -133,7 +133,7 @@ class Hash /** * Default Constructor. * - * @param String $hash + * @param string $hash * @return \phpseclib\Crypt\Hash * @access public */ @@ -161,7 +161,7 @@ class Hash * Keys can be of any length. * * @access public - * @param String $key + * @param string $key */ function setKey($key = false) { @@ -174,7 +174,7 @@ class Hash * As set by the constructor or by the setHash() method. * * @access public - * @return String + * @return string */ function getHash() { @@ -185,7 +185,7 @@ class Hash * Sets the hash function. * * @access public - * @param String $hash + * @param string $hash */ function setHash($hash) { @@ -292,8 +292,8 @@ class Hash * Compute the HMAC. * * @access public - * @param String $text - * @return String + * @param string $text + * @return string */ function hash($text) { @@ -342,7 +342,7 @@ class Hash * Returns the hash length (in bytes) * * @access public - * @return Integer + * @return int */ function getLength() { @@ -353,7 +353,7 @@ class Hash * Wrapper for MD5 * * @access private - * @param String $m + * @param string $m */ function _md5($m) { @@ -364,7 +364,7 @@ class Hash * Wrapper for SHA1 * * @access private - * @param String $m + * @param string $m */ function _sha1($m) { @@ -377,7 +377,7 @@ class Hash * See {@link http://tools.ietf.org/html/rfc1319 RFC1319}. * * @access private - * @param String $m + * @param string $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}. * * @access private - * @param String $m + * @param string $m */ function _sha256($m) { @@ -560,7 +560,7 @@ class Hash * Pure-PHP implementation of SHA384 and SHA512 * * @access private - * @param String $m + * @param string $m */ function _sha512($m) { @@ -739,10 +739,10 @@ class Hash * Right Rotate * * @access private - * @param Integer $int - * @param Integer $amt + * @param int $int + * @param int $amt * @see _sha256() - * @return Integer + * @return int */ function _rightRotate($int, $amt) { @@ -755,10 +755,10 @@ class Hash * Right Shift * * @access private - * @param Integer $int - * @param Integer $amt + * @param int $int + * @param int $amt * @see _sha256() - * @return Integer + * @return int */ function _rightShift($int, $amt) { @@ -770,9 +770,9 @@ class Hash * Not * * @access private - * @param Integer $int + * @param int $int * @see _sha256() - * @return Integer + * @return 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 * possibility of overflow exists, care has to be taken. BigInteger could be used but this should be faster. * - * @param Integer $... - * @return Integer + * @param int $... + * @return int * @see _sha256() * @access private */ @@ -811,9 +811,9 @@ class Hash * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) diff --git a/phpseclib/Crypt/RC2.php b/phpseclib/Crypt/RC2.php index 58351759..a76cb97a 100644 --- a/phpseclib/Crypt/RC2.php +++ b/phpseclib/Crypt/RC2.php @@ -49,7 +49,7 @@ class RC2 extends Base * Block Length of the cipher * * @see \phpseclib\Crypt\Base::block_size - * @var Integer + * @var int * @access private */ var $block_size = 8; @@ -59,7 +59,7 @@ class RC2 extends Base * * @see \phpseclib\Crypt\Base::key * @see setKey() - * @var String + * @var string * @access private */ var $key; @@ -71,7 +71,7 @@ class RC2 extends Base * @see setKey() * @see encrypt() * @see decrypt() - * @var String + * @var string * @access private */ var $orig_key; @@ -81,7 +81,7 @@ class RC2 extends Base * * @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 16; // = 128 bits @@ -90,7 +90,7 @@ class RC2 extends Base * The mcrypt specific name of the cipher * * @see \phpseclib\Crypt\Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'rc2'; @@ -99,7 +99,7 @@ class RC2 extends Base * Optimizing value while CFB-encrypting * * @see \phpseclib\Crypt\Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 500; @@ -109,7 +109,7 @@ class RC2 extends Base * * @see \phpseclib\Crypt\RC2::setKeyLength() * @see \phpseclib\Crypt\RC2::setKey() - * @var Integer + * @var int * @access private * @internal Should be in range [1..1024]. * @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::setKey() - * @var Integer + * @var int * @access private * @internal Should be in range [1..1024]. */ @@ -131,7 +131,7 @@ class RC2 extends Base * The Key Schedule * * @see \phpseclib\Crypt\RC2::_setupKey() - * @var Array + * @var array * @access private */ var $keys; @@ -141,7 +141,7 @@ class RC2 extends Base * Twice the same 256-value sequence to save a modulus in key expansion. * * @see \phpseclib\Crypt\RC2::setKey() - * @var Array + * @var array * @access private */ var $pitable = array( @@ -215,7 +215,7 @@ class RC2 extends Base * Inverse key expansion randomization table. * * @see \phpseclib\Crypt\RC2::setKey() - * @var Array + * @var array * @access private */ 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() * * @see \phpseclib\Crypt\Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -285,7 +285,7 @@ class RC2 extends Base * \phpseclib\Crypt\RC2::setKey() call. * * @access public - * @param Integer $length in bits + * @param int $length in bits */ function setKeyLength($length) { @@ -307,8 +307,8 @@ class RC2 extends Base * * @see \phpseclib\Crypt\Base::setKey() * @access public - * @param String $key - * @param Integer $t1 optional Effective key length in bits. + * @param string $key + * @param int $t1 optional Effective key length in bits. */ function setKey($key, $t1 = 0) { @@ -359,8 +359,8 @@ class RC2 extends Base * * @see decrypt() * @access public - * @param String $plaintext - * @return String $ciphertext + * @param string $plaintext + * @return string $ciphertext */ function encrypt($plaintext) { @@ -382,8 +382,8 @@ class RC2 extends Base * * @see encrypt() * @access public - * @param String $ciphertext - * @return String $plaintext + * @param string $ciphertext + * @return string $plaintext */ function decrypt($ciphertext) { @@ -404,8 +404,8 @@ class RC2 extends Base * @see \phpseclib\Crypt\Base::_encryptBlock() * @see \phpseclib\Crypt\Base::encrypt() * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -449,8 +449,8 @@ class RC2 extends Base * @see \phpseclib\Crypt\Base::_decryptBlock() * @see \phpseclib\Crypt\Base::decrypt() * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { diff --git a/phpseclib/Crypt/RC4.php b/phpseclib/Crypt/RC4.php index 2c7f74c2..0451ea5a 100644 --- a/phpseclib/Crypt/RC4.php +++ b/phpseclib/Crypt/RC4.php @@ -70,7 +70,7 @@ class RC4 extends Base * so we the block_size to 0 * * @see \phpseclib\Crypt\Base::block_size - * @var Integer + * @var int * @access private */ var $block_size = 0; @@ -80,7 +80,7 @@ class RC4 extends Base * * @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 128; // = 1024 bits @@ -89,7 +89,7 @@ class RC4 extends Base * The mcrypt specific name of the cipher * * @see \phpseclib\Crypt\Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'arcfour'; @@ -107,7 +107,7 @@ class RC4 extends Base * The Key * * @see \phpseclib\Crypt\RC4::setKey() - * @var String + * @var string * @access private */ var $key = "\0"; @@ -116,7 +116,7 @@ class RC4 extends Base * The Key Stream for decryption and encryption * * @see \phpseclib\Crypt\RC4::setKey() - * @var Array + * @var array * @access private */ var $stream; @@ -141,9 +141,9 @@ class RC4 extends Base * This is mainly just a wrapper to set things up for Crypt_Base::isValidEngine() * * @see Crypt_Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ 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://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() * @access public */ @@ -198,7 +198,7 @@ class RC4 extends Base * * @access public * @see \phpseclib\Crypt\Base::setKey() - * @param String $key + * @param string $key */ function setKey($key) { @@ -211,8 +211,8 @@ class RC4 extends Base * @see \phpseclib\Crypt\Base::decrypt() * @see \phpseclib\Crypt\RC4::_crypt() * @access public - * @param String $plaintext - * @return String $ciphertext + * @param string $plaintext + * @return string $ciphertext */ function encrypt($plaintext) { @@ -231,8 +231,8 @@ class RC4 extends Base * @see \phpseclib\Crypt\Base::encrypt() * @see \phpseclib\Crypt\RC4::_crypt() * @access public - * @param String $ciphertext - * @return String $plaintext + * @param string $ciphertext + * @return string $plaintext */ function decrypt($ciphertext) { @@ -246,7 +246,7 @@ class RC4 extends Base * Encrypts a block * * @access private - * @param String $in + * @param string $in */ function _encryptBlock($in) { @@ -257,7 +257,7 @@ class RC4 extends Base * Decrypts a block * * @access private - * @param String $in + * @param string $in */ function _decryptBlock($in) { @@ -297,9 +297,9 @@ class RC4 extends Base * @see \phpseclib\Crypt\RC4::encrypt() * @see \phpseclib\Crypt\RC4::decrypt() * @access private - * @param String $text - * @param Integer $mode - * @return String $text + * @param string $text + * @param int $mode + * @return string $text */ function _crypt($text, $mode) { diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 283bfb93..b770ea3e 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -252,7 +252,7 @@ class RSA /** * Precomputed Zero * - * @var Array + * @var array * @access private */ var $zero; @@ -260,7 +260,7 @@ class RSA /** * Precomputed One * - * @var Array + * @var array * @access private */ var $one; @@ -268,7 +268,7 @@ class RSA /** * Private Key Format * - * @var Integer + * @var int * @access private */ var $privateKeyFormat = self::PRIVATE_FORMAT_PKCS1; @@ -276,7 +276,7 @@ class RSA /** * Public Key Format * - * @var Integer + * @var int * @access public */ var $publicKeyFormat = self::PUBLIC_FORMAT_PKCS8; @@ -308,7 +308,7 @@ class RSA /** * Primes for Chinese Remainder Theorem (ie. p and q) * - * @var Array + * @var array * @access private */ var $primes; @@ -316,7 +316,7 @@ class RSA /** * Exponents for Chinese Remainder Theorem (ie. dP and dQ) * - * @var Array + * @var array * @access private */ var $exponents; @@ -324,7 +324,7 @@ class RSA /** * Coefficients for Chinese Remainder Theorem (ie. qInv) * - * @var Array + * @var array * @access private */ var $coefficients; @@ -332,7 +332,7 @@ class RSA /** * Hash name * - * @var String + * @var string * @access private */ var $hashName; @@ -348,7 +348,7 @@ class RSA /** * Length of hash function output * - * @var Integer + * @var int * @access private */ var $hLen; @@ -356,7 +356,7 @@ class RSA /** * Length of salt * - * @var Integer + * @var int * @access private */ var $sLen; @@ -372,7 +372,7 @@ class RSA /** * Length of MGF hash function output * - * @var Integer + * @var int * @access private */ var $mgfHLen; @@ -380,7 +380,7 @@ class RSA /** * Encryption mode * - * @var Integer + * @var int * @access private */ var $encryptionMode = self::ENCRYPTION_OAEP; @@ -388,7 +388,7 @@ class RSA /** * Signature mode * - * @var Integer + * @var int * @access private */ var $signatureMode = self::SIGNATURE_PSS; @@ -396,7 +396,7 @@ class RSA /** * Public Exponent * - * @var Mixed + * @var mixed * @access private */ var $publicExponent = false; @@ -404,7 +404,7 @@ class RSA /** * Password * - * @var String + * @var string * @access private */ 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. * * @see \phpseclib\Crypt\RSA::_start_element_handler() - * @var Array + * @var array * @access private */ var $components = array(); @@ -428,7 +428,7 @@ class RSA * * @see \phpseclib\Crypt\RSA::_character_handler() * @see \phpseclib\Crypt\RSA::_stop_element_handler() - * @var Mixed + * @var mixed * @access private */ var $current; @@ -438,7 +438,7 @@ class RSA * * Set to null to use system configuration file. * @see \phpseclib\Crypt\RSA::createKey() - * @var Mixed + * @var mixed * @Access public */ var $configFile; @@ -446,7 +446,7 @@ class RSA /** * Public key comment field. * - * @var String + * @var string * @access private */ var $comment = 'phpseclib-generated-key'; @@ -537,8 +537,8 @@ class RSA * Will need to be passed back to \phpseclib\Crypt\RSA::createKey() as the third parameter for further processing. * * @access public - * @param Integer $bits - * @param Integer $timeout + * @param int $bits + * @param int $timeout * @param array $p */ function createKey($bits = 1024, $timeout = false, $partial = array()) @@ -718,8 +718,8 @@ class RSA * * @access private * @see setPrivateKeyFormat() - * @param String $RSAPrivateKey - * @return String + * @param string $RSAPrivateKey + * @return string */ function _convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients) { @@ -947,8 +947,8 @@ class RSA * * @access private * @see setPublicKeyFormat() - * @param String $RSAPrivateKey - * @return String + * @param string $RSAPrivateKey + * @return string */ function _convertPublicKey($n, $e) { @@ -1026,9 +1026,9 @@ class RSA * @access private * @see _convertPublicKey() * @see _convertPrivateKey() - * @param String $key - * @param Integer $type - * @return Array + * @param string $key + * @param int $type + * @return array */ function _parseKey($key, $type) { @@ -1423,7 +1423,7 @@ class RSA * More specifically, this returns the size of the modulo in bits. * * @access public - * @return Integer + * @return int */ function getSize() { @@ -1436,9 +1436,9 @@ class RSA * Called by xml_set_element_handler() * * @access private - * @param Resource $parser - * @param String $name - * @param Array $attribs + * @param resource $parser + * @param string $name + * @param array $attribs */ function _start_element_handler($parser, $name, $attribs) { @@ -1477,8 +1477,8 @@ class RSA * Called by xml_set_element_handler() * * @access private - * @param Resource $parser - * @param String $name + * @param resource $parser + * @param string $name */ function _stop_element_handler($parser, $name) { @@ -1494,8 +1494,8 @@ class RSA * Called by xml_set_character_data_handler() * * @access private - * @param Resource $parser - * @param String $data + * @param resource $parser + * @param string $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) * * @access public - * @param String $key - * @param Integer $type optional + * @param string $key + * @param int $type optional */ function loadKey($key, $type = false) { @@ -1629,7 +1629,7 @@ class RSA * @see createKey() * @see loadKey() * @access public - * @param String $password + * @param string $password */ function setPassword($password = false) { @@ -1653,9 +1653,9 @@ class RSA * * @see getPublicKey() * @access public - * @param String $key optional - * @param Integer $type optional - * @return Boolean + * @param string $key optional + * @param int $type optional + * @return bool */ function setPublicKey($key = false, $type = false) { @@ -1713,9 +1713,9 @@ class RSA * * @see getPublicKey() * @access public - * @param String $key optional - * @param Integer $type optional - * @return Boolean + * @param string $key optional + * @param int $type optional + * @return bool */ function setPrivateKey($key = false, $type = false) { @@ -1744,8 +1744,8 @@ class RSA * * @see getPublicKey() * @access public - * @param String $key - * @param Integer $type optional + * @param string $key + * @param int $type optional */ 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) * * @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. */ public function getPublicKeyFingerprint($algorithm = 'md5') @@ -1802,8 +1802,8 @@ class RSA * * @see getPublicKey() * @access public - * @param String $key - * @param Integer $type optional + * @param string $key + * @param int $type optional */ function getPrivateKey($type = self::PUBLIC_FORMAT_PKCS1) { @@ -1826,8 +1826,8 @@ class RSA * * @see getPrivateKey() * @access private - * @param String $key - * @param Integer $type optional + * @param string $key + * @param int $type optional */ function _getPrivatePublicKey($mode = self::PUBLIC_FORMAT_PKCS8) { @@ -1873,8 +1873,8 @@ class RSA * Generates the smallest and largest numbers requiring $bits bits * * @access private - * @param Integer $bits - * @return Array + * @param int $bits + * @return array */ 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. * * @access private - * @param String $string - * @return Integer + * @param string $string + * @return int */ 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. * * @access private - * @param Integer $length - * @return String + * @param int $length + * @return string */ function _encodeLength($length) { @@ -1941,9 +1941,9 @@ class RSA * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) @@ -1958,7 +1958,7 @@ class RSA * * @see createKey() * @access public - * @param Integer $format + * @param int $format */ function setPrivateKeyFormat($format) { @@ -1970,7 +1970,7 @@ class RSA * * @see createKey() * @access public - * @param Integer $format + * @param int $format */ function setPublicKeyFormat($format) { @@ -1984,7 +1984,7 @@ class RSA * decryption. If $hash isn't supported, sha1 is used. * * @access public - * @param String $hash + * @param string $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. * * @access public - * @param String $hash + * @param string $hash */ function setMGFHash($hash) { @@ -2042,7 +2042,7 @@ class RSA * of the hash function Hash) and 0. * * @access public - * @param Integer $format + * @param int $format */ function setSaltLength($sLen) { @@ -2056,8 +2056,8 @@ class RSA * * @access private * @param \phpseclib\Math\BigInteger $x - * @param Integer $xLen - * @return String + * @param int $xLen + * @return string */ 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}. * * @access private - * @param String $x + * @param string $x * @return \phpseclib\Math\BigInteger */ function _os2ip($x) @@ -2169,7 +2169,7 @@ class RSA * @access private * @param \phpseclib\Math\BigInteger $x * @param \phpseclib\Math\BigInteger $r - * @param Integer $i + * @param int $i * @return \phpseclib\Math\BigInteger */ function _blind($x, $r, $i) @@ -2194,9 +2194,9 @@ class RSA * Thanks for the heads up singpolyma! * * @access private - * @param String $x - * @param String $y - * @return Boolean + * @param string $x + * @param string $y + * @return bool */ 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}. * * @access private - * @param String $mgfSeed - * @param Integer $mgfLen - * @return String + * @param string $mgfSeed + * @param int $mgfLen + * @return string */ function _mgf1($mgfSeed, $maskLen) { @@ -2315,9 +2315,9 @@ class RSA * {http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding OAES}. * * @access private - * @param String $m - * @param String $l - * @return String + * @param string $m + * @param string $l + * @return string */ function _rsaes_oaep_encrypt($m, $l = '') { @@ -2378,9 +2378,9 @@ class RSA * this document. * * @access private - * @param String $c - * @param String $l - * @return String + * @param string $c + * @param string $l + * @return string */ function _rsaes_oaep_decrypt($c, $l = '') { @@ -2437,8 +2437,8 @@ class RSA * Doesn't use padding and is not recommended. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ 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}. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ function _rsaes_pkcs1_v1_5_encrypt($m) { @@ -2512,8 +2512,8 @@ class RSA * not private key encrypted ciphertext's. * * @access private - * @param String $c - * @return String + * @param string $c + * @return string */ 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}. * * @access private - * @param String $m - * @param Integer $emBits + * @param string $m + * @param int $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}. * * @access private - * @param String $m - * @param String $em - * @param Integer $emBits - * @return String + * @param string $m + * @param string $em + * @param int $emBits + * @return string */ 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}. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ 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}. * * @access private - * @param String $m - * @param String $s - * @return String + * @param string $m + * @param string $s + * @return string */ 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}. * * @access private - * @param String $m - * @param Integer $emLen - * @return String + * @param string $m + * @param int $emLen + * @return string */ 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}. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ 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}. * * @access private - * @param String $m - * @return String + * @param string $m + * @return string */ function _rsassa_pkcs1_v1_5_verify($m, $s) { @@ -2836,7 +2836,7 @@ class RSA * Valid values include self::ENCRYPTION_OAEP and self::ENCRYPTION_PKCS1. * * @access public - * @param Integer $mode + * @param int $mode */ function setEncryptionMode($mode) { @@ -2849,7 +2849,7 @@ class RSA * Valid values include self::SIGNATURE_PSS and self::SIGNATURE_PKCS1 * * @access public - * @param Integer $mode + * @param int $mode */ function setSignatureMode($mode) { @@ -2860,7 +2860,7 @@ class RSA * Set public key comment. * * @access public - * @param String $comment + * @param string $comment */ function setComment($comment) { @@ -2871,7 +2871,7 @@ class RSA * Get public key comment. * * @access public - * @return String + * @return string */ function getComment() { @@ -2887,8 +2887,8 @@ class RSA * * @see decrypt() * @access public - * @param String $plaintext - * @return String + * @param string $plaintext + * @return string */ function encrypt($plaintext) { @@ -2933,8 +2933,8 @@ class RSA * * @see encrypt() * @access public - * @param String $plaintext - * @return String + * @param string $plaintext + * @return string */ function decrypt($ciphertext) { @@ -2975,8 +2975,8 @@ class RSA * * @see verify() * @access public - * @param String $message - * @return String + * @param string $message + * @return string */ function sign($message) { @@ -2998,9 +2998,9 @@ class RSA * * @see sign() * @access public - * @param String $message - * @param String $signature - * @return Boolean + * @param string $message + * @param string $signature + * @return bool */ function verify($message, $signature) { @@ -3021,8 +3021,8 @@ class RSA * Extract raw BER from Base64 encoding * * @access private - * @param String $str - * @return String + * @param string $str + * @return string */ function _extractBER($str) { diff --git a/phpseclib/Crypt/Random.php b/phpseclib/Crypt/Random.php index 9fb1d15b..161c9a9f 100644 --- a/phpseclib/Crypt/Random.php +++ b/phpseclib/Crypt/Random.php @@ -48,8 +48,8 @@ class Random * microoptimizations because this function has the potential of being called a huge number of times. * eg. for RSA key generation. * - * @param Integer $length - * @return String + * @param int $length + * @return string */ public static function string($length) { diff --git a/phpseclib/Crypt/Rijndael.php b/phpseclib/Crypt/Rijndael.php index 10c9c891..3b168f6c 100644 --- a/phpseclib/Crypt/Rijndael.php +++ b/phpseclib/Crypt/Rijndael.php @@ -70,7 +70,7 @@ class Rijndael extends Base * * @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 16; @@ -86,7 +86,7 @@ class Rijndael extends Base * @see \phpseclib\Crypt\Base::cipher_name_mcrypt * @see \phpseclib\Crypt\Base::engine * @see isValidEngine() - * @var String + * @var string * @access private */ 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::setPassword() - * @var String + * @var string * @access private */ 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? * * @see setKeyLength() - * @var Boolean + * @var bool * @access private */ var $explicit_key_length = false; @@ -114,7 +114,7 @@ class Rijndael extends Base * The Key Schedule * * @see _setup() - * @var Array + * @var array * @access private */ var $w; @@ -123,7 +123,7 @@ class Rijndael extends Base * The Inverse Key Schedule * * @see _setup() - * @var Array + * @var array * @access private */ var $dw; @@ -132,7 +132,7 @@ class Rijndael extends Base * The Block Length divided by 32 * * @see setBlockLength() - * @var Integer + * @var int * @access private * @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 @@ -145,7 +145,7 @@ class Rijndael extends Base * The Key Length * * @see setKeyLength() - * @var Integer + * @var int * @access private * @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 @@ -158,7 +158,7 @@ class Rijndael extends Base * The Key Length divided by 32 * * @see setKeyLength() - * @var Integer + * @var int * @access private * @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 * - * @var Integer + * @var int * @access private * @internal The max value is 14, the min value is 10. */ @@ -176,7 +176,7 @@ class Rijndael extends Base /** * Shift offsets * - * @var Array + * @var array * @access private */ var $c; @@ -184,7 +184,7 @@ class Rijndael extends Base /** * Holds the last used key- and block_size information * - * @var Array + * @var array * @access private */ var $kl; @@ -209,7 +209,7 @@ class Rijndael extends Base * If not explictly set, \phpseclib\Crypt\Base::MODE_CBC will be used. * * @see \phpseclib\Crypt\Base::Crypt_Base() - * @param Integer $mode + * @param int $mode * @access public /** @@ -227,7 +227,7 @@ class Rijndael extends Base * @see \phpseclib\Crypt\Base:setKey() * @see setKeyLength() * @access public - * @param String $key + * @param string $key */ function setKey($key) { @@ -271,7 +271,7 @@ class Rijndael extends Base * This results then in slower encryption. * * @access public - * @param Integer $length + * @param int $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. * * @access public - * @param Integer $length + * @param int $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() * * @see \phpseclib\Crypt\Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -367,8 +367,8 @@ class Rijndael extends Base * Encrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -468,8 +468,8 @@ class Rijndael extends Base * Decrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { @@ -673,7 +673,7 @@ class Rijndael extends Base * Performs S-Box substitutions * * @access private - * @param Integer $word + * @param int $word */ function _subWord($word) { @@ -695,7 +695,7 @@ class Rijndael extends Base * @see Crypt_Rijndael:_setupInlineCrypt() * @see Crypt_Rijndael:_subWord() * @access private - * @return Array &$tables + * @return array &$tables */ function &_getTables() { @@ -784,7 +784,7 @@ class Rijndael extends Base * @see Crypt_Rijndael:_setupInlineCrypt() * @see Crypt_Rijndael:_setupKey() * @access private - * @return Array &$tables + * @return array &$tables */ function &_getInvTables() { diff --git a/phpseclib/Crypt/TripleDES.php b/phpseclib/Crypt/TripleDES.php index 84921319..3ce025e9 100644 --- a/phpseclib/Crypt/TripleDES.php +++ b/phpseclib/Crypt/TripleDES.php @@ -69,7 +69,7 @@ class TripleDES extends DES * @see \phpseclib\Crypt\DES::password_key_size * @see \phpseclib\Crypt\Base::password_key_size * @see \phpseclib\Crypt\Base::setPassword() - * @var Integer + * @var int * @access private */ var $password_key_size = 24; @@ -79,7 +79,7 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\Base::password_default_salt * @see \phpseclib\Crypt\Base::setPassword() - * @var String + * @var string * @access private */ var $password_default_salt = 'phpseclib'; @@ -89,7 +89,7 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\DES::cipher_name_mcrypt * @see \phpseclib\Crypt\Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'tripledes'; @@ -98,7 +98,7 @@ class TripleDES extends DES * Optimizing value while CFB-encrypting * * @see \phpseclib\Crypt\Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 750; @@ -108,7 +108,7 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\TripleDES::setKey() * @see \phpseclib\Crypt\DES::setKey() - * @var String + * @var string * @access private */ var $key_size_max = 24; @@ -116,7 +116,7 @@ class TripleDES extends DES /** * Internal flag whether using self::MODE_3CBC or not * - * @var Boolean + * @var bool * @access private */ var $mode_3cbc; @@ -126,7 +126,7 @@ class TripleDES extends DES * * Used only if $mode_3cbc === true * - * @var Array + * @var array * @access private */ var $des; @@ -154,7 +154,7 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\DES::__construct() * @see \phpseclib\Crypt\Base::__construct() - * @param Integer $mode + * @param int $mode * @access public */ 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() * * @see \phpseclib\Crypt\Base::Crypt_Base() - * @param Integer $engine + * @param int $engine * @access public - * @return Boolean + * @return bool */ function isValidEngine($engine) { @@ -213,7 +213,7 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\Base::setIV() * @access public - * @param String $iv + * @param string $iv */ function setIV($iv) { @@ -238,7 +238,7 @@ class TripleDES extends DES * @access public * @see \phpseclib\Crypt\DES::setKey() * @see \phpseclib\Crypt\Base::setKey() - * @param String $key + * @param string $key */ function setKey($key) { @@ -269,8 +269,8 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\Base::encrypt() * @access public - * @param String $plaintext - * @return String $cipertext + * @param string $plaintext + * @return string $cipertext */ function encrypt($plaintext) { @@ -296,8 +296,8 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\Base::decrypt() * @access public - * @param String $ciphertext - * @return String $plaintext + * @param string $ciphertext + * @return string $plaintext */ function decrypt($ciphertext) { @@ -423,9 +423,9 @@ class TripleDES extends DES * * @see \phpseclib\Crypt\Base::Crypt_Base() * @see \phpseclib\Crypt\Base::setPreferredEngine() - * @param Integer $engine + * @param int $engine * @access public - * @return Integer + * @return int */ function setPreferredEngine($engine) { diff --git a/phpseclib/Crypt/Twofish.php b/phpseclib/Crypt/Twofish.php index 9c32de67..6d938e27 100644 --- a/phpseclib/Crypt/Twofish.php +++ b/phpseclib/Crypt/Twofish.php @@ -53,7 +53,7 @@ class Twofish extends Base * The mcrypt specific name of the cipher * * @see \phpseclib\Crypt\Base::cipher_name_mcrypt - * @var String + * @var string * @access private */ var $cipher_name_mcrypt = 'twofish'; @@ -62,7 +62,7 @@ class Twofish extends Base * Optimizing value while CFB-encrypting * * @see \phpseclib\Crypt\Base::cfb_init_len - * @var Integer + * @var int * @access private */ var $cfb_init_len = 800; @@ -70,7 +70,7 @@ class Twofish extends Base /** * Q-Table * - * @var Array + * @var array * @access private */ var $q0 = array ( @@ -111,7 +111,7 @@ class Twofish extends Base /** * Q-Table * - * @var Array + * @var array * @access private */ var $q1 = array ( @@ -152,7 +152,7 @@ class Twofish extends Base /** * M-Table * - * @var Array + * @var array * @access private */ var $m0 = array ( @@ -193,7 +193,7 @@ class Twofish extends Base /** * M-Table * - * @var Array + * @var array * @access private */ var $m1 = array ( @@ -234,7 +234,7 @@ class Twofish extends Base /** * M-Table * - * @var Array + * @var array * @access private */ var $m2 = array ( @@ -275,7 +275,7 @@ class Twofish extends Base /** * M-Table * - * @var Array + * @var array * @access private */ var $m3 = array ( @@ -316,7 +316,7 @@ class Twofish extends Base /** * The Key Schedule Array * - * @var Array + * @var array * @access private */ var $K = array(); @@ -324,7 +324,7 @@ class Twofish extends Base /** * The Key depended S-Table 0 * - * @var Array + * @var array * @access private */ var $S0 = array(); @@ -332,7 +332,7 @@ class Twofish extends Base /** * The Key depended S-Table 1 * - * @var Array + * @var array * @access private */ var $S1 = array(); @@ -340,7 +340,7 @@ class Twofish extends Base /** * The Key depended S-Table 2 * - * @var Array + * @var array * @access private */ var $S2 = array(); @@ -348,7 +348,7 @@ class Twofish extends Base /** * The Key depended S-Table 3 * - * @var Array + * @var array * @access private */ var $S3 = array(); @@ -356,7 +356,7 @@ class Twofish extends Base /** * Holds the last used key * - * @var Array + * @var array * @access private */ var $kl; @@ -372,7 +372,7 @@ class Twofish extends Base * * @access public * @see \phpseclib\Crypt\Base::setKey() - * @param String $key + * @param string $key */ function setKey($key) { @@ -504,9 +504,9 @@ class Twofish extends Base * _mdsrem function using by the twofish cipher algorithm * * @access private - * @param String $A - * @param String $B - * @return Array + * @param string $A + * @param string $B + * @return array */ function _mdsrem($A, $B) { @@ -552,8 +552,8 @@ class Twofish extends Base * Encrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _encryptBlock($in) { @@ -608,8 +608,8 @@ class Twofish extends Base * Decrypts a block * * @access private - * @param String $in - * @return String + * @param string $in + * @return string */ function _decryptBlock($in) { diff --git a/phpseclib/File/ANSI.php b/phpseclib/File/ANSI.php index 1daf787a..1f3eecb3 100644 --- a/phpseclib/File/ANSI.php +++ b/phpseclib/File/ANSI.php @@ -32,7 +32,7 @@ class ANSI /** * Max Width * - * @var Integer + * @var int * @access private */ var $max_x; @@ -40,7 +40,7 @@ class ANSI /** * Max Height * - * @var Integer + * @var int * @access private */ var $max_y; @@ -48,7 +48,7 @@ class ANSI /** * Max History * - * @var Integer + * @var int * @access private */ var $max_history; @@ -56,7 +56,7 @@ class ANSI /** * History * - * @var Array + * @var array * @access private */ var $history; @@ -64,7 +64,7 @@ class ANSI /** * History Attributes * - * @var Array + * @var array * @access private */ var $history_attrs; @@ -72,7 +72,7 @@ class ANSI /** * Current Column * - * @var Integer + * @var int * @access private */ var $x; @@ -80,7 +80,7 @@ class ANSI /** * Current Row * - * @var Integer + * @var int * @access private */ var $y; @@ -88,7 +88,7 @@ class ANSI /** * Old Column * - * @var Integer + * @var int * @access private */ var $old_x; @@ -96,7 +96,7 @@ class ANSI /** * Old Row * - * @var Integer + * @var int * @access private */ var $old_y; @@ -104,7 +104,7 @@ class ANSI /** * An empty attribute cell * - * @var Object + * @var object * @access private */ var $base_attr_cell; @@ -112,7 +112,7 @@ class ANSI /** * The current attribute cell * - * @var Object + * @var object * @access private */ var $attr_cell; @@ -120,7 +120,7 @@ class ANSI /** * An empty attribute row * - * @var Array + * @var array * @access private */ var $attr_row; @@ -128,7 +128,7 @@ class ANSI /** * The current screen text * - * @var Array + * @var array * @access private */ var $screen; @@ -136,7 +136,7 @@ class ANSI /** * The current screen attributes * - * @var Array + * @var array * @access private */ var $attrs; @@ -144,7 +144,7 @@ class ANSI /** * Current ANSI code * - * @var String + * @var string * @access private */ var $ansi; @@ -152,7 +152,7 @@ class ANSI /** * Tokenization * - * @var Array + * @var array * @access private */ var $tokenization; @@ -184,8 +184,8 @@ class ANSI * * Resets the screen as well * - * @param Integer $x - * @param Integer $y + * @param int $x + * @param int $y * @access public */ function setDimensions($x, $y) @@ -203,8 +203,8 @@ class ANSI /** * Set the number of lines that should be logged past the terminal height * - * @param Integer $x - * @param Integer $y + * @param int $x + * @param int $y * @access public */ function setHistory($history) @@ -215,7 +215,7 @@ class ANSI /** * Load a string * - * @param String $source + * @param string $source * @access public */ function loadString($source) @@ -227,7 +227,7 @@ class ANSI /** * Appdend a string * - * @param String $source + * @param string $source * @access public */ function appendString($source) @@ -458,7 +458,7 @@ class ANSI * Returns the current coordinate without preformating * * @access private - * @return String + * @return string */ function _processCoordinate($last_attr, $cur_attr, $char) { @@ -515,7 +515,7 @@ class ANSI * Returns the current screen without preformating * * @access private - * @return String + * @return string */ function _getScreen() { @@ -539,7 +539,7 @@ class ANSI * Returns the current screen * * @access public - * @return String + * @return string */ function getScreen() { @@ -550,7 +550,7 @@ class ANSI * Returns the current screen and the x previous lines * * @access public - * @return String + * @return string */ function getHistory() { diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 3435c8e2..b71469b4 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -104,7 +104,7 @@ class ASN1 /** * ASN.1 object identifier * - * @var Array + * @var array * @access private * @link http://en.wikipedia.org/wiki/Object_identifier */ @@ -113,7 +113,7 @@ class ASN1 /** * Default date format * - * @var String + * @var string * @access private * @link http://php.net/class.datetime */ @@ -122,7 +122,7 @@ class ASN1 /** * Default date format * - * @var Array + * @var array * @access private * @see \phpseclib\File\ASN1::setTimeFormat() * @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? * - * @var Array + * @var array * @access private * @see \phpseclib\File\ASN1::_encode_der() */ @@ -148,7 +148,7 @@ class ASN1 * Unambiguous types get the direct mapping (int/real/bool). * Others are mapped as a choice, with an extra indexing level. * - * @var Array + * @var array * @access public */ var $ANYmap = array( @@ -182,7 +182,7 @@ class ASN1 * Non-convertable types are absent from this table. * size == 0 indicates variable length encoding. * - * @var Array + * @var array * @access public */ var $stringTypeSize = array( @@ -200,8 +200,8 @@ class ASN1 * * Serves a similar purpose to openssl's asn1parse * - * @param String $encoded - * @return Array + * @param string $encoded + * @return array * @access public */ 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 * self::TYPE_OCTET_STRING. In those cases, the indefinite length is used. * - * @param String $encoded - * @param Integer $start - * @return Array + * @param string $encoded + * @param int $start + * @return array * @access private */ 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. * - * @param Array $decoded - * @param Array $mapping - * @param Array $special - * @return Array + * @param array $decoded + * @param array $mapping + * @param array $special + * @return array * @access public */ function asn1map($decoded, $mapping, $special = array()) @@ -774,10 +774,10 @@ class ASN1 * * "Special" mappings can be applied via $special. * - * @param String $source - * @param String $mapping - * @param Integer $idx - * @return String + * @param string $source + * @param string $mapping + * @param int $idx + * @return string * @access public */ function encodeDER($source, $mapping, $special = array()) @@ -789,10 +789,10 @@ class ASN1 /** * ASN.1 Encode (Helper function) * - * @param String $source - * @param String $mapping - * @param Integer $idx - * @return String + * @param string $source + * @param string $mapping + * @param int $idx + * @return string * @access private */ 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. * * @access private - * @param Integer $length - * @return String + * @param int $length + * @return string */ function _encodeLength($length) { @@ -1108,9 +1108,9 @@ class ASN1 * Called by _decode_ber() and in the case of implicit tags asn1map(). * * @access private - * @param String $content - * @param Integer $tag - * @return String + * @param string $content + * @param int $tag + * @return string */ function _decodeTime($content, $tag) { @@ -1157,7 +1157,7 @@ class ASN1 * Sets the time / date format for asn1map(). * * @access public - * @param String $format + * @param string $format */ function setTimeFormat($format) { @@ -1170,7 +1170,7 @@ class ASN1 * Load the relevant OIDs for a particular ASN.1 semantic mapping. * * @access public - * @param Array $oids + * @param array $oids */ function loadOIDs($oids) { @@ -1183,7 +1183,7 @@ class ASN1 * See \phpseclib\File\X509, etc, for an example. * * @access public - * @param Array $filters + * @param array $filters */ function loadFilters($filters) { @@ -1195,9 +1195,9 @@ class ASN1 * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) @@ -1213,10 +1213,10 @@ class ASN1 * This is a lazy conversion, dealing only with character size. * No real conversion table is used. * - * @param String $in - * @param Integer $from - * @param Integer $to - * @return String + * @param string $in + * @param int $from + * @param int $to + * @return string * @access public */ function convert($in, $from = self::TYPE_UTF8_STRING, $to = self::TYPE_UTF8_STRING) diff --git a/phpseclib/File/ASN1/Element.php b/phpseclib/File/ASN1/Element.php index d0da53bd..68246e2b 100644 --- a/phpseclib/File/ASN1/Element.php +++ b/phpseclib/File/ASN1/Element.php @@ -28,7 +28,7 @@ class Element /** * Raw element value * - * @var String + * @var string * @access private */ var $element; @@ -36,7 +36,7 @@ class Element /** * Constructor * - * @param String $encoded + * @param string $encoded * @return \phpseclib\File\ASN1\Element * @access public */ diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index cfdfbe2e..937f178d 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -116,7 +116,7 @@ class X509 /** * ASN.1 syntax for X.509 certificates * - * @var Array + * @var array * @access private */ var $Certificate; @@ -165,7 +165,7 @@ class X509 /** * ASN.1 syntax for Certificate Signing Requests (RFC2986) * - * @var Array + * @var array * @access private */ var $CertificationRequest; @@ -173,7 +173,7 @@ class X509 /** * ASN.1 syntax for Certificate Revocation Lists (RFC5280) * - * @var Array + * @var array * @access private */ var $CertificateList; @@ -181,7 +181,7 @@ class X509 /** * Distinguished Name * - * @var Array + * @var array * @access private */ var $dn; @@ -189,7 +189,7 @@ class X509 /** * Public key * - * @var String + * @var string * @access private */ var $publicKey; @@ -197,7 +197,7 @@ class X509 /** * Private key * - * @var String + * @var string * @access private */ var $privateKey; @@ -205,7 +205,7 @@ class X509 /** * Object identifiers for X.509 certificates * - * @var Array + * @var array * @access private * @link http://en.wikipedia.org/wiki/Object_identifier */ @@ -214,7 +214,7 @@ class X509 /** * The certificate authorities * - * @var Array + * @var array * @access private */ var $CAs; @@ -222,7 +222,7 @@ class X509 /** * The currently loaded certificate * - * @var Array + * @var array * @access private */ 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 * encoded so we take save the portion of the original cert that the signature would have made for. * - * @var String + * @var string * @access private */ var $signatureSubject; @@ -241,7 +241,7 @@ class X509 /** * Certificate Start Date * - * @var String + * @var string * @access private */ var $startDate; @@ -249,7 +249,7 @@ class X509 /** * Certificate End Date * - * @var String + * @var string * @access private */ var $endDate; @@ -257,7 +257,7 @@ class X509 /** * Serial Number * - * @var String + * @var string * @access private */ 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 * {@link http://tools.ietf.org/html/rfc5280#section-4.2.1.2 RFC5280#section-4.2.1.2}. * - * @var String + * @var string * @access private */ var $currentKeyIdentifier; @@ -276,7 +276,7 @@ class X509 /** * CA Flag * - * @var Boolean + * @var bool * @access private */ var $caFlag = false; @@ -284,7 +284,7 @@ class X509 /** * SPKAC Challenge * - * @var String + * @var string * @access private */ 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 * - * @param String $cert + * @param string $cert * @access public - * @return Mixed + * @return mixed */ function loadX509($cert) { @@ -1464,10 +1464,10 @@ class X509 /** * Save X.509 certificate * - * @param Array $cert - * @param Integer $format optional + * @param array $cert + * @param int $format optional * @access public - * @return String + * @return string */ function saveX509($cert, $format = self::FORMAT_PEM) { @@ -1540,9 +1540,9 @@ class X509 * Map extension values from octet string to extension-specific internal * format. * - * @param Array ref $root - * @param String $path - * @param Object $asn1 + * @param array ref $root + * @param string $path + * @param object $asn1 * @access private */ function _mapInExtensions(&$root, $path, $asn1) @@ -1590,9 +1590,9 @@ class X509 * Map extension values from extension-specific internal format to * octet string. * - * @param Array ref $root - * @param String $path - * @param Object $asn1 + * @param array ref $root + * @param string $path + * @param object $asn1 * @access private */ function _mapOutExtensions(&$root, $path, $asn1) @@ -1656,9 +1656,9 @@ class X509 * Map attribute values from ANY type to attribute-specific internal * format. * - * @param Array ref $root - * @param String $path - * @param Object $asn1 + * @param array ref $root + * @param string $path + * @param object $asn1 * @access private */ function _mapInAttributes(&$root, $path, $asn1) @@ -1697,9 +1697,9 @@ class X509 * Map attribute values from attribute-specific internal format to * ANY type. * - * @param Array ref $root - * @param String $path - * @param Object $asn1 + * @param array ref $root + * @param string $path + * @param object $asn1 * @access private */ function _mapOutAttributes(&$root, $path, $asn1) @@ -1739,9 +1739,9 @@ class X509 /** * Associate an extension ID to an extension mapping * - * @param String $extnId + * @param string $extnId * @access private - * @return Mixed + * @return mixed */ function _getMapping($extnId) { @@ -1835,9 +1835,9 @@ class X509 /** * Load an X.509 certificate as a certificate authority * - * @param String $cert + * @param string $cert * @access public - * @return Boolean + * @return bool */ function loadCA($cert) { @@ -1902,9 +1902,9 @@ class X509 * 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. * - * @param String $url + * @param string $url * @access public - * @return Boolean + * @return bool */ function validateURL($url) { @@ -1960,7 +1960,7 @@ class X509 * * If $date isn't defined it is assumed to be the current date. * - * @param Integer $date optional + * @param int $date optional * @access public */ 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}. * - * @param Boolean $caonly optional + * @param bool $caonly optional * @access public - * @return Mixed + * @return mixed */ 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 * - * @param String $publicKeyAlgorithm - * @param String $publicKey - * @param String $signatureAlgorithm - * @param String $signature - * @param String $signatureSubject + * @param string $publicKeyAlgorithm + * @param string $publicKey + * @param string $signatureAlgorithm + * @param string $signature + * @param string $signatureSubject * @access private - * @return Integer + * @return int */ 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) * - * @param String $algorithm - * @param String $key + * @param string $algorithm + * @param string $key * @access private - * @return String + * @return string */ function _reformatKey($algorithm, $key) { @@ -2180,9 +2180,9 @@ class X509 * * Takes in a base64 encoded "blob" and returns a human readable IP address * - * @param String $ip + * @param string $ip * @access private - * @return String + * @return string */ function _decodeIP($ip) { @@ -2196,9 +2196,9 @@ class X509 * * Takes a human readable IP address into a base64-encoded "blob" * - * @param String $ip + * @param string $ip * @access private - * @return String + * @return string */ function _encodeIP($ip) { @@ -2208,9 +2208,9 @@ class X509 /** * "Normalizes" a Distinguished Name property * - * @param String $propName + * @param string $propName * @access private - * @return Mixed + * @return mixed */ function _translateDNProp($propName) { @@ -2297,11 +2297,11 @@ class X509 /** * Set a Distinguished Name property * - * @param String $propName - * @param Mixed $propValue - * @param String $type optional + * @param string $propName + * @param mixed $propValue + * @param string $type optional * @access public - * @return Boolean + * @return bool */ function setDNProp($propName, $propValue, $type = 'utf8String') { @@ -2331,7 +2331,7 @@ class X509 /** * Remove Distinguished Name properties * - * @param String $propName + * @param string $propName * @access public */ function removeDNProp($propName) @@ -2358,10 +2358,10 @@ class X509 /** * Get Distinguished Name properties * - * @param String $propName - * @param Array $dn optional - * @param Boolean $withType optional - * @return Mixed + * @param string $propName + * @param array $dn optional + * @param bool $withType optional + * @return mixed * @access public */ function getDNProp($propName, $dn = null, $withType = false) @@ -2409,11 +2409,11 @@ class X509 /** * Set a Distinguished Name * - * @param Mixed $dn - * @param Boolean $merge optional - * @param String $type optional + * @param mixed $dn + * @param bool $merge optional + * @param string $type optional * @access public - * @return Boolean + * @return bool */ function setDN($dn, $merge = false, $type = 'utf8String') { @@ -2452,10 +2452,10 @@ class X509 /** * Get the Distinguished Name for a certificates subject * - * @param Mixed $format optional - * @param Array $dn optional + * @param mixed $format optional + * @param array $dn optional * @access public - * @return Boolean + * @return bool */ function getDN($format = self::DN_ARRAY, $dn = null) { @@ -2595,9 +2595,9 @@ class X509 /** * Get the Distinguished Name for a certificate/crl issuer * - * @param Integer $format optional + * @param int $format optional * @access public - * @return Mixed + * @return mixed */ function getIssuerDN($format = self::DN_ARRAY) { @@ -2617,9 +2617,9 @@ class X509 * Get the Distinguished Name for a certificate/csr subject * Alias of getDN() * - * @param Integer $format optional + * @param int $format optional * @access public - * @return Mixed + * @return mixed */ function getSubjectDN($format = self::DN_ARRAY) { @@ -2640,10 +2640,10 @@ class X509 /** * Get an individual Distinguished Name property for a certificate/crl issuer * - * @param String $propName - * @param Boolean $withType optional + * @param string $propName + * @param bool $withType optional * @access public - * @return Mixed + * @return mixed */ function getIssuerDNProp($propName, $withType = false) { @@ -2662,10 +2662,10 @@ class X509 /** * Get an individual Distinguished Name property for a certificate/csr subject * - * @param String $propName - * @param Boolean $withType optional + * @param string $propName + * @param bool $withType optional * @access public - * @return Mixed + * @return mixed */ function getSubjectDNProp($propName, $withType = false) { @@ -2687,7 +2687,7 @@ class X509 * Get the certificate chain for the current cert * * @access public - * @return Mixed + * @return mixed */ function getChain() { @@ -2733,9 +2733,9 @@ class X509 * * Key needs to be a \phpseclib\Crypt\RSA object * - * @param Object $key + * @param object $key * @access public - * @return Boolean + * @return bool */ function setPublicKey($key) { @@ -2748,7 +2748,7 @@ class X509 * * Key needs to be a \phpseclib\Crypt\RSA object * - * @param Object $key + * @param object $key * @access public */ function setPrivateKey($key) @@ -2761,7 +2761,7 @@ class X509 * * Used for SPKAC CSR's * - * @param String $challenge + * @param string $challenge * @access public */ function setChallenge($challenge) @@ -2775,7 +2775,7 @@ class X509 * Returns a \phpseclib\Crypt\RSA object or a false. * * @access public - * @return Mixed + * @return mixed */ function getPublicKey() { @@ -2813,9 +2813,9 @@ class X509 /** * Load a Certificate Signing Request * - * @param String $csr + * @param string $csr * @access public - * @return Mixed + * @return mixed */ function loadCSR($csr) { @@ -2886,10 +2886,10 @@ class X509 /** * Save CSR request * - * @param Array $csr - * @param Integer $format optional + * @param array $csr + * @param int $format optional * @access public - * @return String + * @return string */ function saveCSR($csr, $format = self::FORMAT_PEM) { @@ -2938,9 +2938,9 @@ class X509 * * https://developer.mozilla.org/en-US/docs/HTML/Element/keygen * - * @param String $csr + * @param string $csr * @access public - * @return Mixed + * @return mixed */ function loadSPKAC($spkac) { @@ -3009,10 +3009,10 @@ class X509 /** * Save a SPKAC CSR request * - * @param Array $csr - * @param Integer $format optional + * @param array $csr + * @param int $format optional * @access public - * @return String + * @return string */ function saveSPKAC($spkac, $format = self::FORMAT_PEM) { @@ -3052,9 +3052,9 @@ class X509 /** * Load a Certificate Revocation List * - * @param String $crl + * @param string $crl * @access public - * @return Mixed + * @return mixed */ function loadCRL($crl) { @@ -3107,10 +3107,10 @@ class X509 /** * Save Certificate Revocation List. * - * @param Array $crl - * @param Integer $format optional + * @param array $crl + * @param int $format optional * @access public - * @return String + * @return string */ function saveCRL($crl, $format = self::FORMAT_PEM) { @@ -3169,9 +3169,9 @@ class X509 * - 5.1.2.6 Revoked Certificates * 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 - * @return Array + * @return array */ function _timeField($date) { @@ -3192,9 +3192,9 @@ class X509 * * @param \phpseclib\File\X509 $issuer * @param \phpseclib\File\X509 $subject - * @param String $signatureAlgorithm optional + * @param string $signatureAlgorithm optional * @access public - * @return Mixed + * @return mixed */ function sign($issuer, $subject, $signatureAlgorithm = 'sha1WithRSAEncryption') { @@ -3371,7 +3371,7 @@ class X509 * Sign a CSR * * @access public - * @return Mixed + * @return mixed */ function signCSR($signatureAlgorithm = 'sha1WithRSAEncryption') { @@ -3429,7 +3429,7 @@ class X509 * Sign a SPKAC * * @access public - * @return Mixed + * @return mixed */ function signSPKAC($signatureAlgorithm = 'sha1WithRSAEncryption') { @@ -3497,9 +3497,9 @@ class X509 * * @param \phpseclib\File\X509 $issuer * @param \phpseclib\File\X509 $crl - * @param String $signatureAlgorithm optional + * @param string $signatureAlgorithm optional * @access public - * @return Mixed + * @return mixed */ function signCRL($issuer, $crl, $signatureAlgorithm = 'sha1WithRSAEncryption') { @@ -3624,11 +3624,11 @@ class X509 /** * X.509 certificate signing helper function. * - * @param Object $key + * @param object $key * @param \phpseclib\File\X509 $subject - * @param String $signatureAlgorithm + * @param string $signatureAlgorithm * @access public - * @return Mixed + * @return mixed */ function _sign($key, $signatureAlgorithm) { @@ -3655,7 +3655,7 @@ class X509 /** * Set certificate start date * - * @param String $date + * @param string $date * @access public */ function setStartDate($date) @@ -3666,7 +3666,7 @@ class X509 /** * Set certificate end date * - * @param String $date + * @param string $date * @access public */ function setEndDate($date) @@ -3691,7 +3691,7 @@ class X509 /** * Set Serial Number * - * @param String $serial + * @param string $serial * @param $base optional * @access public */ @@ -3714,8 +3714,8 @@ class X509 * Get a reference to a subarray * * @param array $root - * @param String $path absolute path with / as component separator - * @param Boolean $create optional + * @param string $path absolute path with / as component separator + * @param bool $create optional * @access private * @return array item ref or false */ @@ -3750,8 +3750,8 @@ class X509 * Get a reference to an extension subarray * * @param array $root - * @param String $path optional absolute path with / as component separator - * @param Boolean $create optional + * @param string $path optional absolute path with / as component separator + * @param bool $create optional * @access private * @return array ref or false */ @@ -3804,10 +3804,10 @@ class X509 /** * Remove an Extension * - * @param String $id - * @param String $path optional + * @param string $id + * @param string $path optional * @access private - * @return Boolean + * @return bool */ function _removeExtension($id, $path = null) { @@ -3834,11 +3834,11 @@ class X509 * * Returns the extension if it exists and false if not * - * @param String $id - * @param Array $cert optional - * @param String $path optional + * @param string $id + * @param array $cert optional + * @param string $path optional * @access private - * @return Mixed + * @return mixed */ function _getExtension($id, $cert = null, $path = null) { @@ -3861,9 +3861,9 @@ class X509 * Returns a list of all extensions in use * * @param array $cert optional - * @param String $path optional + * @param string $path optional * @access private - * @return Array + * @return array */ function _getExtensions($cert = null, $path = null) { @@ -3882,13 +3882,13 @@ class X509 /** * Set an Extension * - * @param String $id - * @param Mixed $value - * @param Boolean $critical optional - * @param Boolean $replace optional - * @param String $path optional + * @param string $id + * @param mixed $value + * @param bool $critical optional + * @param bool $replace optional + * @param string $path optional * @access private - * @return Boolean + * @return bool */ function _setExtension($id, $value, $critical = false, $replace = true, $path = null) { @@ -3918,9 +3918,9 @@ class X509 /** * Remove a certificate, CSR or CRL Extension * - * @param String $id + * @param string $id * @access public - * @return Boolean + * @return bool */ function removeExtension($id) { @@ -3932,10 +3932,10 @@ class X509 * * Returns the extension if it exists and false if not * - * @param String $id - * @param Array $cert optional + * @param string $id + * @param array $cert optional * @access public - * @return Mixed + * @return mixed */ function getExtension($id, $cert = null) { @@ -3947,7 +3947,7 @@ class X509 * * @param array $cert optional * @access public - * @return Array + * @return array */ function getExtensions($cert = null) { @@ -3957,12 +3957,12 @@ class X509 /** * Set a certificate, CSR or CRL Extension * - * @param String $id - * @param Mixed $value - * @param Boolean $critical optional - * @param Boolean $replace optional + * @param string $id + * @param mixed $value + * @param bool $critical optional + * @param bool $replace optional * @access public - * @return Boolean + * @return bool */ function setExtension($id, $value, $critical = false, $replace = true) { @@ -3972,10 +3972,10 @@ class X509 /** * Remove a CSR attribute. * - * @param String $id - * @param Integer $disposition optional + * @param string $id + * @param int $disposition optional * @access public - * @return Boolean + * @return bool */ function removeAttribute($id, $disposition = self::ATTR_ALL) { @@ -4022,11 +4022,11 @@ class X509 * * Returns the attribute if it exists and false if not * - * @param String $id - * @param Integer $disposition optional - * @param Array $csr optional + * @param string $id + * @param int $disposition optional + * @param array $csr optional * @access public - * @return Mixed + * @return mixed */ function getAttribute($id, $disposition = self::ATTR_ALL, $csr = null) { @@ -4066,7 +4066,7 @@ class X509 * * @param array $csr optional * @access public - * @return Array + * @return array */ function getAttributes($csr = null) { @@ -4089,11 +4089,11 @@ class X509 /** * Set a CSR attribute * - * @param String $id - * @param Mixed $value - * @param Boolean $disposition optional + * @param string $id + * @param mixed $value + * @param bool $disposition optional * @access public - * @return Boolean + * @return bool */ 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. * - * @param String $value + * @param string $value * @access public */ function setKeyIdentifier($value) @@ -4172,10 +4172,10 @@ class X509 * - \phpseclib\File\ASN1\Element object * - PEM or DER string * - * @param Mixed $key optional - * @param Integer $method optional + * @param mixed $key optional + * @param int $method optional * @access public - * @return String binary key identifier + * @return string binary key identifier */ function computeKeyIdentifier($key = null, $method = 1) { @@ -4249,7 +4249,7 @@ class X509 * Format a public key as appropriate * * @access private - * @return Array + * @return array */ function _formatSubjectPublicKey() { @@ -4270,7 +4270,7 @@ class X509 * Set the domain name's which the cert is to be valid for * * @access public - * @return Array + * @return array */ function setDomain() { @@ -4283,7 +4283,7 @@ class X509 * Set the IP Addresses's which the cert is to be valid for * * @access public - * @param String $ipAddress optional + * @param string $ipAddress optional */ function setIPAddress() { @@ -4300,8 +4300,8 @@ class X509 * Helper function to build domain array * * @access private - * @param String $domain - * @return Array + * @param string $domain + * @return array */ function _dnsName($domain) { @@ -4314,8 +4314,8 @@ class X509 * (IPv6 is not currently supported) * * @access private - * @param String $address - * @return Array + * @param string $address + * @return array */ function _iPAddress($address) { @@ -4326,10 +4326,10 @@ class X509 * Get the index of a revoked certificate. * * @param array $rclist - * @param String $serial - * @param Boolean $create optional + * @param string $serial + * @param bool $create optional * @access private - * @return Integer or false + * @return int or false */ function _revokedCertificate(&$rclist, $serial, $create = false) { @@ -4354,10 +4354,10 @@ class X509 /** * Revoke a certificate. * - * @param String $serial - * @param String $date optional + * @param string $serial + * @param string $date optional * @access public - * @return Boolean + * @return bool */ function revoke($serial, $date = null) { @@ -4381,9 +4381,9 @@ class X509 /** * Unrevoke a certificate. * - * @param String $serial + * @param string $serial * @access public - * @return Boolean + * @return bool */ function unrevoke($serial) { @@ -4401,9 +4401,9 @@ class X509 /** * Get a revoked certificate. * - * @param String $serial + * @param string $serial * @access public - * @return Mixed + * @return mixed */ function getRevoked($serial) { @@ -4447,10 +4447,10 @@ class X509 /** * Remove a Revoked Certificate Extension * - * @param String $serial - * @param String $id + * @param string $serial + * @param string $id * @access public - * @return Boolean + * @return bool */ function removeRevokedCertificateExtension($serial, $id) { @@ -4468,11 +4468,11 @@ class X509 * * Returns the extension if it exists and false if not * - * @param String $serial - * @param String $id - * @param Array $crl optional + * @param string $serial + * @param string $id + * @param array $crl optional * @access public - * @return Mixed + * @return mixed */ 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 * - * @param String $serial + * @param string $serial * @param array $crl optional * @access public - * @return Array + * @return array */ function getRevokedCertificateExtensions($serial, $crl = null) { @@ -4515,13 +4515,13 @@ class X509 /** * Set a Revoked Certificate Extension * - * @param String $serial - * @param String $id - * @param Mixed $value - * @param Boolean $critical optional - * @param Boolean $replace optional + * @param string $serial + * @param string $id + * @param mixed $value + * @param bool $critical optional + * @param bool $replace optional * @access public - * @return Boolean + * @return bool */ function setRevokedCertificateExtension($serial, $id, $value, $critical = false, $replace = true) { @@ -4540,8 +4540,8 @@ class X509 * Extract raw BER from Base64 encoding * * @access private - * @param String $str - * @return String + * @param string $str + * @return string */ function _extractBER($str) { diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index efd0a71c..bcef0541 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -186,7 +186,7 @@ class BigInteger /** * Holds the BigInteger's value. * - * @var Array + * @var array * @access private */ var $value; @@ -194,7 +194,7 @@ class BigInteger /** * Holds the BigInteger's magnitude. * - * @var Boolean + * @var bool * @access private */ var $is_negative = false; @@ -231,7 +231,7 @@ class BigInteger * * @see __sleep() * @see __wakeup() - * @var String + * @var string * @access private */ var $hex; @@ -252,7 +252,7 @@ class BigInteger * * * @param $x base-10 number or base-$base number if $base set. - * @param integer $base + * @param int $base * @return \phpseclib\Math\BigInteger * @access public */ @@ -522,8 +522,8 @@ class BigInteger * ?> * * - * @param Boolean $twos_compliment - * @return String + * @param bool $twos_compliment + * @return string * @access public * @internal Converts a base-2**26 number to base-2**8 */ @@ -617,8 +617,8 @@ class BigInteger * ?> * * - * @param Boolean $twos_compliment - * @return String + * @param bool $twos_compliment + * @return string * @access public * @internal Converts a base-2**26 number to base-2**8 */ @@ -642,8 +642,8 @@ class BigInteger * ?> * * - * @param Boolean $twos_compliment - * @return String + * @param bool $twos_compliment + * @return string * @access public * @internal Converts a base-2**26 number to base-2**2 */ @@ -678,7 +678,7 @@ class BigInteger * ?> * * - * @return String + * @return string * @access public * @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. * - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @return Array + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @return array * @access private */ function _add($x_value, $x_negative, $y_value, $y_negative) @@ -992,11 +992,11 @@ class BigInteger /** * Performs subtraction. * - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @return Array + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @return array * @access private */ function _subtract($x_value, $x_negative, $y_value, $y_negative) @@ -1125,11 +1125,11 @@ class BigInteger /** * Performs multiplication. * - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @return Array + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @return array * @access private */ function _multiply($x_value, $x_negative, $y_value, $y_negative) @@ -1164,9 +1164,9 @@ class BigInteger * * Modeled after 'multiply' in MutableBigInteger.java. * - * @param Array $x_value - * @param Array $y_value - * @return Array + * @param array $x_value + * @param array $y_value + * @return array * @access private */ function _regularMultiply($x_value, $y_value) @@ -1228,9 +1228,9 @@ class BigInteger * 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}. * - * @param Array $x_value - * @param Array $y_value - * @return Array + * @param array $x_value + * @param array $y_value + * @return array * @access private */ function _karatsuba($x_value, $y_value) @@ -1267,8 +1267,8 @@ class BigInteger /** * Performs squaring * - * @param Array $x - * @return Array + * @param array $x + * @return array * @access private */ 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://math.libtomcrypt.com/files/tommath.pdf#page=141 MPM 5.3} for more information. * - * @param Array $value - * @return Array + * @param array $value + * @return array * @access private */ function _baseSquare($value) @@ -1324,8 +1324,8 @@ class BigInteger * 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}. * - * @param Array $value - * @return Array + * @param array $value + * @return array * @access private */ function _karatsubaSquare($value) @@ -1379,7 +1379,7 @@ class BigInteger * * * @param \phpseclib\Math\BigInteger $y - * @return Array + * @return array * @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}. */ @@ -1559,9 +1559,9 @@ class BigInteger * * abc / x = a00 / x + b0 / x + c / x * - * @param Array $dividend - * @param Array $divisor - * @return Array + * @param array $dividend + * @param array $divisor + * @return array * @access private */ function _divide_digit($dividend, $divisor) @@ -1784,7 +1784,7 @@ class BigInteger * * @param \phpseclib\Math\BigInteger $e * @param \phpseclib\Math\BigInteger $n - * @param Integer $mode + * @param int $mode * @return \phpseclib\Math\BigInteger * @access private */ @@ -1859,10 +1859,10 @@ class BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @param Integer $mode - * @return Array + * @param array $x + * @param array $n + * @param int $mode + * @return array */ function _reduce($x, $n, $mode) { @@ -1896,10 +1896,10 @@ class BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @param Integer $mode - * @return Array + * @param array $x + * @param array $n + * @param int $mode + * @return array */ function _prepareReduce($x, $n, $mode) { @@ -1914,11 +1914,11 @@ class BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $y - * @param Array $n - * @param Integer $mode - * @return Array + * @param array $x + * @param array $y + * @param array $n + * @param int $mode + * @return array */ function _multiplyReduce($x, $y, $n, $mode) { @@ -1934,10 +1934,10 @@ class BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @param Integer $mode - * @return Array + * @param array $x + * @param array $n + * @param int $mode + * @return array */ function _squareReduce($x, $n, $mode) { @@ -1985,9 +1985,9 @@ class BigInteger * * @see _slidingWindow() * @access private - * @param Array $n - * @param Array $m - * @return Array + * @param array $n + * @param array $m + * @return array */ function _barrett($n, $m) { @@ -2082,9 +2082,9 @@ class BigInteger * * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @return Array + * @param array $x + * @param array $n + * @return array */ 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. * * @see _regularBarrett() - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @param Integer $stop - * @return Array + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @param int $stop + * @return array * @access private */ function _multiplyLower($x_value, $x_negative, $y_value, $y_negative, $stop) @@ -2235,9 +2235,9 @@ class BigInteger * @see _prepMontgomery() * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @return Array + * @param array $x + * @param array $n + * @return array */ function _montgomery($x, $n) { @@ -2282,10 +2282,10 @@ class BigInteger * @see _prepMontgomery() * @see _montgomery() * @access private - * @param Array $x - * @param Array $y - * @param Array $m - * @return Array + * @param array $x + * @param array $y + * @param array $m + * @return array */ function _montgomeryMultiply($x, $y, $m) { @@ -2334,9 +2334,9 @@ class BigInteger * @see _montgomery() * @see _slidingWindow() * @access private - * @param Array $x - * @param Array $n - * @return Array + * @param array $x + * @param array $n + * @return array */ function _prepMontgomery($x, $n) { @@ -2372,8 +2372,8 @@ class BigInteger * * @see _montgomery() * @access private - * @param Array $x - * @return Integer + * @param array $x + * @return int */ 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). * * @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 * @see equals() * @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. * - * @param Array $x_value - * @param Boolean $x_negative - * @param Array $y_value - * @param Boolean $y_negative - * @return Integer + * @param array $x_value + * @param bool $x_negative + * @param array $y_value + * @param bool $y_negative + * @return int * @see compare() * @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() * * @param \phpseclib\Math\BigInteger $x - * @return Boolean + * @return bool * @access public * @see compare() */ @@ -2728,7 +2728,7 @@ class BigInteger * Some bitwise operations give different results depending on the precision being used. Examples include left * shift, not, and rotates. * - * @param Integer $bits + * @param int $bits * @access public */ function setPrecision($bits) @@ -2906,7 +2906,7 @@ class BigInteger * * Shifts BigInteger's by $shift bits, effectively dividing by 2**$shift. * - * @param Integer $shift + * @param int $shift * @return \phpseclib\Math\BigInteger * @access public * @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. * - * @param Integer $shift + * @param int $shift * @return \phpseclib\Math\BigInteger * @access public * @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. * - * @param Integer $shift + * @param int $shift * @return \phpseclib\Math\BigInteger * @access public */ @@ -3027,7 +3027,7 @@ class BigInteger * * 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 * @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. * - * @param Integer $length + * @param int $length * @return \phpseclib\Math\BigInteger * @access private */ @@ -3158,8 +3158,8 @@ class BigInteger * * @param \phpseclib\Math\BigInteger $arg1 * @param \phpseclib\Math\BigInteger $arg2 - * @param Integer $timeout - * @return Mixed + * @param int $timeout + * @return mixed * @access public * @internal See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap4.pdf#page=15 HAC 4.44}. */ @@ -3287,7 +3287,7 @@ class BigInteger * on a website instead of just one. * * @param \phpseclib\Math\BigInteger $t - * @return Boolean + * @return bool * @access public * @internal Uses the * {@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. * - * @param Integer $shift + * @param int $shift * @access private */ function _lshift($shift) @@ -3474,7 +3474,7 @@ class BigInteger * * Shifts BigInteger's by $shift bits. * - * @param Integer $shift + * @param int $shift * @access private */ function _rshift($shift) @@ -3558,7 +3558,7 @@ class BigInteger * * Removes leading zeros * - * @param Array $value + * @param array $value * @return \phpseclib\Math\BigInteger * @access private */ @@ -3579,7 +3579,7 @@ class BigInteger * * @param $input Array * @param $multiplier mixed - * @return Array + * @return array * @access private */ function _array_repeat($input, $multiplier) @@ -3594,7 +3594,7 @@ class BigInteger * * @param $x String * @param $shift Integer - * @return String + * @return string * @access private */ function _base256_lshift(&$x, $shift) @@ -3623,7 +3623,7 @@ class BigInteger * * @param $x String * @param $shift Integer - * @return String + * @return string * @access private */ function _base256_rshift(&$x, $shift) @@ -3663,8 +3663,8 @@ class BigInteger /** * Converts 32-bit integers to bytes. * - * @param Integer $x - * @return String + * @param int $x + * @return string * @access private */ function _int2bytes($x) @@ -3675,8 +3675,8 @@ class BigInteger /** * Converts bytes to 32-bit integers * - * @param String $x - * @return Integer + * @param string $x + * @return int * @access private */ function _bytes2int($x) @@ -3692,8 +3692,8 @@ class BigInteger * * @see modPow() * @access private - * @param Integer $length - * @return String + * @param int $length + * @return string */ function _encodeASN1Length($length) { @@ -3714,9 +3714,9 @@ class BigInteger * we'll guarantee that the dividend is divisible by first subtracting the remainder. * * @access private - * @param Integer $x - * @param Integer $y - * @return Integer + * @param int $x + * @param int $y + * @return int */ function _safe_divide($x, $y) { diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index 3e94a62f..ed7c66f1 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -76,7 +76,7 @@ class SCP /** * SSH Object * - * @var Object + * @var object * @access private */ var $ssh; @@ -84,7 +84,7 @@ class SCP /** * Packet Size * - * @var Integer + * @var int * @access private */ var $packet_size; @@ -92,7 +92,7 @@ class SCP /** * Mode * - * @var Integer + * @var int * @access private */ var $mode; @@ -102,9 +102,9 @@ class SCP * * Connects to an SSH server * - * @param String $host - * @param Integer $port - * @param Integer $timeout + * @param string $host + * @param int $port + * @param int $timeout * @return \phpseclib\Net\SCP * @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 * care of that, yourself. * - * @param String $remote_file - * @param String $data - * @param Integer $mode - * @param Callable $callback - * @return Boolean + * @param string $remote_file + * @param string $data + * @param int $mode + * @param callable $callback + * @return bool * @access public */ 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 * operation * - * @param String $remote_file - * @param String $local_file - * @return Mixed + * @param string $remote_file + * @param string $local_file + * @return mixed * @access public */ function get($remote_file, $local_file = false) @@ -270,7 +270,7 @@ class SCP /** * Sends a packet to an SSH server * - * @param String $data + * @param string $data * @access private */ function _send($data) @@ -288,7 +288,7 @@ class SCP /** * Receives a packet from an SSH server * - * @return String + * @return string * @access private */ function _receive() diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 89c3d31d..040a40dd 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -91,7 +91,7 @@ class SFTP extends SSH2 * Packet Types * * @see \phpseclib\Net\SFTP::__construct() - * @var Array + * @var array * @access private */ var $packet_types = array(); @@ -100,7 +100,7 @@ class SFTP extends SSH2 * Status Codes * * @see \phpseclib\Net\SFTP::__construct() - * @var Array + * @var array * @access private */ 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 * concurrent actions, so it's somewhat academic, here. * - * @var Integer + * @var int * @see \phpseclib\Net\SFTP::_send_sftp_packet() * @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 * concurrent actions, so it's somewhat academic, here. * - * @var Integer + * @var int * @see \phpseclib\Net\SFTP::_get_sftp_packet() * @access private */ @@ -132,7 +132,7 @@ class SFTP extends SSH2 /** * Packet Buffer * - * @var String + * @var string * @see \phpseclib\Net\SFTP::_get_sftp_packet() * @access private */ @@ -141,7 +141,7 @@ class SFTP extends SSH2 /** * Extensions supported by the server * - * @var Array + * @var array * @see \phpseclib\Net\SFTP::_initChannel() * @access private */ @@ -150,7 +150,7 @@ class SFTP extends SSH2 /** * Server SFTP version * - * @var Integer + * @var int * @see \phpseclib\Net\SFTP::_initChannel() * @access private */ @@ -159,7 +159,7 @@ class SFTP extends SSH2 /** * Current working directory * - * @var String + * @var string * @see \phpseclib\Net\SFTP::_realpath() * @see \phpseclib\Net\SFTP::chdir() * @access private @@ -170,7 +170,7 @@ class SFTP extends SSH2 * Packet Type Log * * @see \phpseclib\Net\SFTP::getLog() - * @var Array + * @var array * @access private */ var $packet_type_log = array(); @@ -179,7 +179,7 @@ class SFTP extends SSH2 * Packet Log * * @see \phpseclib\Net\SFTP::getLog() - * @var Array + * @var array * @access private */ var $packet_log = array(); @@ -189,7 +189,7 @@ class SFTP extends SSH2 * * @see \phpseclib\Net\SFTP::getSFTPErrors() * @see \phpseclib\Net\SFTP::getLastSFTPError() - * @var String + * @var string * @access private */ var $sftp_errors = array(); @@ -203,7 +203,7 @@ class SFTP extends SSH2 * @see \phpseclib\Net\SFTP::_update_stat_cache() * @see \phpseclib\Net\SFTP::_remove_from_stat_cache() * @see \phpseclib\Net\SFTP::_query_stat_cache() - * @var Array + * @var array * @access private */ var $stat_cache = array(); @@ -213,7 +213,7 @@ class SFTP extends SSH2 * * @see \phpseclib\Net\SFTP::__construct() * @see \phpseclib\Net\SFTP::get() - * @var Array + * @var array * @access private */ var $max_sftp_packet; @@ -223,7 +223,7 @@ class SFTP extends SSH2 * * @see \phpseclib\Net\SFTP::disableStatCache() * @see \phpseclib\Net\SFTP::enableStatCache() - * @var Boolean + * @var bool * @access private */ var $use_stat_cache = true; @@ -233,7 +233,7 @@ class SFTP extends SSH2 * * @see \phpseclib\Net\SFTP::_comparator() * @see \phpseclib\Net\SFTP::setListOrder() - * @var Array + * @var array * @access private */ var $sortOptions = array(); @@ -243,9 +243,9 @@ class SFTP extends SSH2 * * Connects to an SFTP server * - * @param String $host - * @param Integer $port - * @param Integer $timeout + * @param string $host + * @param int $port + * @param int $timeout * @return \phpseclib\Net\SFTP * @access public */ @@ -381,9 +381,9 @@ class SFTP extends SSH2 /** * Login * - * @param String $username - * @param String $password - * @return Boolean + * @param string $username + * @param string $password + * @return bool * @access public */ function login($username) @@ -571,7 +571,7 @@ class SFTP extends SSH2 /** * Returns the current directory name * - * @return Mixed + * @return mixed * @access public */ function pwd() @@ -582,8 +582,8 @@ class SFTP extends SSH2 /** * Logs errors * - * @param String $response - * @param Integer $status + * @param string $response + * @param int $status * @access public */ function _logError($response, $status = -1) @@ -609,8 +609,8 @@ class SFTP extends SSH2 * the absolute (canonicalized) path. * * @see \phpseclib\Net\SFTP::chdir() - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access private */ function _realpath($path) @@ -665,8 +665,8 @@ class SFTP extends SSH2 /** * Changes the current directory * - * @param String $dir - * @return Boolean + * @param string $dir + * @return bool * @access public */ function chdir($dir) @@ -727,9 +727,9 @@ class SFTP extends SSH2 /** * Returns a list of files in the given directory * - * @param String $dir - * @param Boolean $recursive - * @return Mixed + * @param string $dir + * @param bool $recursive + * @return mixed * @access public */ function nlist($dir = '.', $recursive = false) @@ -740,10 +740,10 @@ class SFTP extends SSH2 /** * Helper method for nlist * - * @param String $dir - * @param Boolean $recursive - * @param String $relativeDir - * @return Mixed + * @param string $dir + * @param bool $recursive + * @param string $relativeDir + * @return mixed * @access private */ function _nlist_helper($dir, $recursive, $relativeDir) @@ -776,9 +776,9 @@ class SFTP extends SSH2 /** * Returns a detailed list of files in the given directory * - * @param String $dir - * @param Boolean $recursive - * @return Mixed + * @param string $dir + * @param bool $recursive + * @return mixed * @access public */ 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 * - * @param String $dir - * @param Boolean $raw - * @return Mixed + * @param string $dir + * @param bool $raw + * @return mixed * @access private */ function _list($dir, $raw = true) @@ -920,9 +920,9 @@ class SFTP extends SSH2 * * Intended for use with uasort() * - * @param Array $a - * @param Array $b - * @return Integer + * @param array $a + * @param array $b + * @return int * @access private */ function _comparator($a, $b) @@ -1020,8 +1020,8 @@ class SFTP extends SSH2 * * Files larger than 4GB will show up as being exactly 4GB. * - * @param String $filename - * @return Mixed + * @param string $filename + * @return mixed * @access public */ function size($filename) @@ -1040,8 +1040,8 @@ class SFTP extends SSH2 /** * Save files / directories to cache * - * @param String $path - * @param Mixed $value + * @param string $path + * @param mixed $value * @access private */ function _update_stat_cache($path, $value) @@ -1084,8 +1084,8 @@ class SFTP extends SSH2 /** * Remove files / directories from cache * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access private */ function _remove_from_stat_cache($path) @@ -1111,8 +1111,8 @@ class SFTP extends SSH2 * * Mainly used by file_exists * - * @param String $dir - * @return Mixed + * @param string $dir + * @return mixed * @access private */ function _query_stat_cache($path) @@ -1134,8 +1134,8 @@ class SFTP extends SSH2 * * Returns an array on success and false otherwise. * - * @param String $filename - * @return Mixed + * @param string $filename + * @return mixed * @access public */ function stat($filename) @@ -1191,8 +1191,8 @@ class SFTP extends SSH2 * * Returns an array on success and false otherwise. * - * @param String $filename - * @return Mixed + * @param string $filename + * @return mixed * @access public */ function lstat($filename) @@ -1257,9 +1257,9 @@ class SFTP extends SSH2 * Determines information without calling \phpseclib\Net\SFTP::_realpath(). * The second parameter can be either NET_SFTP_STAT or NET_SFTP_LSTAT. * - * @param String $filename - * @param Integer $type - * @return Mixed + * @param string $filename + * @param int $type + * @return mixed * @access private */ function _stat($filename, $type) @@ -1286,9 +1286,9 @@ class SFTP extends SSH2 /** * Truncates a file to a given length * - * @param String $filename - * @param Integer $new_size - * @return Boolean + * @param string $filename + * @param int $new_size + * @return bool * @access public */ function truncate($filename, $new_size) @@ -1303,10 +1303,10 @@ class SFTP extends SSH2 * * If the file does not exist, it will be created. * - * @param String $filename - * @param Integer $time - * @param Integer $atime - * @return Boolean + * @param string $filename + * @param int $time + * @param int $atime + * @return bool * @access public */ function touch($filename, $time = null, $atime = null) @@ -1354,10 +1354,10 @@ class SFTP extends SSH2 * * Returns true on success or false on error. * - * @param String $filename - * @param Integer $uid - * @param Boolean $recursive - * @return Boolean + * @param string $filename + * @param int $uid + * @param bool $recursive + * @return bool * @access public */ function chown($filename, $uid, $recursive = false) @@ -1374,10 +1374,10 @@ class SFTP extends SSH2 * * Returns true on success or false on error. * - * @param String $filename - * @param Integer $gid - * @param Boolean $recursive - * @return Boolean + * @param string $filename + * @param int $gid + * @param bool $recursive + * @return bool * @access public */ 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. * If $recursive is true than this just returns true or false. * - * @param Integer $mode - * @param String $filename - * @param Boolean $recursive - * @return Mixed + * @param int $mode + * @param string $filename + * @param bool $recursive + * @return mixed * @access public */ function chmod($mode, $filename, $recursive = false) @@ -1440,10 +1440,10 @@ class SFTP extends SSH2 /** * Sets information about a file * - * @param String $filename - * @param String $attr - * @param Boolean $recursive - * @return Boolean + * @param string $filename + * @param string $attr + * @param bool $recursive + * @return bool * @access private */ function _setstat($filename, $attr, $recursive) @@ -1499,10 +1499,10 @@ class SFTP extends SSH2 * * Minimizes directory lookups and SSH_FXP_STATUS requests for speed. * - * @param String $path - * @param String $attr - * @param Integer $i - * @return Boolean + * @param string $path + * @param string $attr + * @param int $i + * @return bool * @access private */ function _setstat_recursive($path, $attr, &$i) @@ -1569,8 +1569,8 @@ class SFTP extends SSH2 /** * Return the target of a symbolic link * - * @param String $link - * @return Mixed + * @param string $link + * @return mixed * @access public */ 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. * - * @param String $target - * @param String $link - * @return Boolean + * @param string $target + * @param string $link + * @return bool * @access public */ function symlink($target, $link) @@ -1649,8 +1649,8 @@ class SFTP extends SSH2 /** * Creates a directory. * - * @param String $dir - * @return Boolean + * @param string $dir + * @return bool * @access public */ function mkdir($dir, $mode = -1, $recursive = false) @@ -1684,8 +1684,8 @@ class SFTP extends SSH2 /** * Helper function for directory creation * - * @param String $dir - * @return Boolean + * @param string $dir + * @return bool * @access private */ function _mkdir_helper($dir, $attr) @@ -1712,8 +1712,8 @@ class SFTP extends SSH2 /** * Removes a directory. * - * @param String $dir - * @return Boolean + * @param string $dir + * @return bool * @access public */ 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. * - * @param String $remote_file - * @param String|resource $data - * @param Integer $mode - * @param Integer $start - * @param Integer $local_start + * @param string $remote_file + * @param string|resource $data + * @param int $mode + * @param int $start + * @param int $local_start * @param callable|null $progressCallback - * @return Boolean + * @return bool * @access public * @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 * SSH_FXP_WRITEs, in succession, and then reading $i responses. * - * @param Integer $i - * @return Boolean + * @param int $i + * @return bool * @access private */ function _read_put_responses($i) @@ -1974,8 +1974,8 @@ class SFTP extends SSH2 /** * Close handle * - * @param String $handle - * @return Boolean + * @param string $handle + * @return bool * @access private */ function _close_handle($handle) @@ -2010,11 +2010,11 @@ class SFTP extends SSH2 * * $offset and $length can be used to download files in chunks. * - * @param String $remote_file - * @param String $local_file - * @param Integer $offset - * @param Integer $length - * @return Mixed + * @param string $remote_file + * @param string $local_file + * @param int $offset + * @param int $length + * @return mixed * @access public */ 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. * - * @param String $path - * @param Boolean $recursive - * @return Boolean + * @param string $path + * @param bool $recursive + * @return bool * @access public */ function delete($path, $recursive = true) @@ -2176,9 +2176,9 @@ class SFTP extends SSH2 * * Minimizes directory lookups and SSH_FXP_STATUS requests for speed. * - * @param String $path - * @param Integer $i - * @return Boolean + * @param string $path + * @param int $i + * @return bool * @access private */ function _delete_recursive($path, &$i) @@ -2243,8 +2243,8 @@ class SFTP extends SSH2 /** * Checks whether a file or directory exists * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function file_exists($path) @@ -2266,8 +2266,8 @@ class SFTP extends SSH2 /** * Tells whether the filename is a directory * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function is_dir($path) @@ -2282,8 +2282,8 @@ class SFTP extends SSH2 /** * Tells whether the filename is a regular file * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function is_file($path) @@ -2298,8 +2298,8 @@ class SFTP extends SSH2 /** * Tells whether the filename is a symbolic link * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ function is_link($path) @@ -2314,8 +2314,8 @@ class SFTP extends SSH2 /** * Gets last access time of file * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function fileatime($path) @@ -2326,8 +2326,8 @@ class SFTP extends SSH2 /** * Gets file modification time * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function filemtime($path) @@ -2338,8 +2338,8 @@ class SFTP extends SSH2 /** * Gets file permissions * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function fileperms($path) @@ -2350,8 +2350,8 @@ class SFTP extends SSH2 /** * Gets file owner * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function fileowner($path) @@ -2362,8 +2362,8 @@ class SFTP extends SSH2 /** * Gets file group * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function filegroup($path) @@ -2374,8 +2374,8 @@ class SFTP extends SSH2 /** * Gets file size * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function filesize($path) @@ -2386,8 +2386,8 @@ class SFTP extends SSH2 /** * Gets file type * - * @param String $path - * @return Mixed + * @param string $path + * @return mixed * @access public */ function filetype($path) @@ -2420,9 +2420,9 @@ class SFTP extends SSH2 * * Uses cache if appropriate. * - * @param String $path - * @param String $prop - * @return Mixed + * @param string $path + * @param string $prop + * @return mixed * @access private */ function _get_stat_cache_prop($path, $prop) @@ -2435,9 +2435,9 @@ class SFTP extends SSH2 * * Uses cache if appropriate. * - * @param String $path - * @param String $prop - * @return Mixed + * @param string $path + * @param string $prop + * @return mixed * @access private */ function _get_lstat_cache_prop($path, $prop) @@ -2450,9 +2450,9 @@ class SFTP extends SSH2 * * Uses cache if appropriate. * - * @param String $path - * @param String $prop - * @return Mixed + * @param string $path + * @param string $prop + * @return mixed * @access private */ 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 * - * @param String $oldname - * @param String $newname - * @return Boolean + * @param string $oldname + * @param string $newname + * @return bool * @access public */ 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. * - * @param String $response - * @return Array + * @param string $response + * @return array * @access private */ 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 * - * @param Integer $mode - * @return Integer + * @param int $mode + * @return int * @access private */ function _parseMode($mode) @@ -2630,8 +2630,8 @@ class SFTP extends SSH2 * * If the longname is in an unrecognized format bool(false) is returned. * - * @param String $longname - * @return Mixed + * @param string $longname + * @return mixed * @access private */ 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. * - * @param Integer $type - * @param String $data + * @param int $type + * @param string $data * @see \phpseclib\Net\SFTP::_get_sftp_packet() * @see \phpseclib\Net\SSH2::_send_channel_packet() - * @return Boolean + * @return bool * @access private */ function _send_sftp_packet($type, $data) @@ -2704,7 +2704,7 @@ class SFTP extends SSH2 * messages containing one SFTP packet. * * @see \phpseclib\Net\SFTP::_send_sftp_packet() - * @return String + * @return string * @access private */ 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') * * @access public - * @return String or Array + * @return string or Array */ function getSFTPLog() { @@ -2797,7 +2797,7 @@ class SFTP extends SSH2 /** * Returns all errors * - * @return String + * @return string * @access public */ function getSFTPErrors() @@ -2808,7 +2808,7 @@ class SFTP extends SSH2 /** * Returns the last error * - * @return String + * @return string * @access public */ function getLastSFTPError() @@ -2819,7 +2819,7 @@ class SFTP extends SSH2 /** * Get supported SFTP versions * - * @return Array + * @return array * @access public */ function getSupportedVersions() @@ -2834,8 +2834,8 @@ class SFTP extends SSH2 /** * Disconnect * - * @param Integer $reason - * @return Boolean + * @param int $reason + * @return bool * @access private */ function _disconnect($reason) diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index 403c1d03..a62eb4ab 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -34,14 +34,14 @@ class Stream * * Rather than re-create the connection we re-use instances if possible * - * @var Array + * @var array */ static $instances; /** * SFTP instance * - * @var Object + * @var object * @access private */ var $sftp; @@ -49,7 +49,7 @@ class Stream /** * Path * - * @var String + * @var string * @access private */ var $path; @@ -57,7 +57,7 @@ class Stream /** * Mode * - * @var String + * @var string * @access private */ var $mode; @@ -65,7 +65,7 @@ class Stream /** * Position * - * @var Integer + * @var int * @access private */ var $pos; @@ -73,7 +73,7 @@ class Stream /** * Size * - * @var Integer + * @var int * @access private */ var $size; @@ -81,7 +81,7 @@ class Stream /** * Directory entries * - * @var Array + * @var array * @access private */ var $entries; @@ -89,7 +89,7 @@ class Stream /** * EOF flag * - * @var Boolean + * @var bool * @access private */ var $eof; @@ -99,7 +99,7 @@ class Stream * * Technically this needs to be publically accessible so PHP can set it directly * - * @var Resource + * @var resource * @access public */ var $context; @@ -107,7 +107,7 @@ class Stream /** * Notification callback function * - * @var Callable + * @var callable * @access public */ var $notification; @@ -115,8 +115,8 @@ class Stream /** * Registers this class as a URL wrapper. * - * @param String $protocol The wrapper name to be registered. - * @return Boolean True on success, false otherwise. + * @param string $protocol The wrapper name to be registered. + * @return bool True on success, false otherwise. * @access public */ 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 * NET_SSH2_MSG_USERAUTH_SUCCESS. For a failed login it's NET_SSH2_MSG_USERAUTH_FAILURE. * - * @param String $path - * @return String + * @param string $path + * @return string * @access private */ function _parse_path($path) @@ -239,11 +239,11 @@ class Stream /** * Opens file or URL * - * @param String $path - * @param String $mode - * @param Integer $options - * @param String $opened_path - * @return Boolean + * @param string $path + * @param string $mode + * @param int $options + * @param string $opened_path + * @return bool * @access public */ function _stream_open($path, $mode, $options, &$opened_path) @@ -284,8 +284,8 @@ class Stream /** * Read from stream * - * @param Integer $count - * @return Mixed + * @param int $count + * @return mixed * @access public */ function _stream_read($count) @@ -326,8 +326,8 @@ class Stream /** * Write to stream * - * @param String $data - * @return Mixed + * @param string $data + * @return mixed * @access public */ function _stream_write($data) @@ -361,7 +361,7 @@ class Stream /** * Retrieve the current position of a stream * - * @return Integer + * @return int * @access public */ 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. * - * @return Boolean + * @return bool * @access public */ function _stream_eof() @@ -390,9 +390,9 @@ class Stream /** * Seeks to specific location in a stream * - * @param Integer $offset - * @param Integer $whence - * @return Boolean + * @param int $offset + * @param int $whence + * @return bool * @access public */ function _stream_seek($offset, $whence) @@ -418,10 +418,10 @@ class Stream /** * Change stream options * - * @param String $path - * @param Integer $option - * @param Mixed $var - * @return Boolean + * @param string $path + * @param int $option + * @param mixed $var + * @return bool * @access public */ function _stream_metadata($path, $option, $var) @@ -452,8 +452,8 @@ class Stream /** * Retrieve the underlaying resource * - * @param Integer $cast_as - * @return Resource + * @param int $cast_as + * @return resource * @access public */ function _stream_cast($cast_as) @@ -464,8 +464,8 @@ class Stream /** * Advisory file locking * - * @param Integer $operation - * @return Boolean + * @param int $operation + * @return bool * @access public */ 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 * does. * - * @param String $path_from - * @param String $path_to - * @return Boolean + * @param string $path_from + * @param string $path_to + * @return bool * @access public */ function _rename($path_from, $path_to) @@ -532,9 +532,9 @@ class Stream * string longname * ATTRS attrs * - * @param String $path - * @param Integer $options - * @return Boolean + * @param string $path + * @param int $options + * @return bool * @access public */ function _dir_opendir($path, $options) @@ -551,7 +551,7 @@ class Stream /** * Read entry from directory handle * - * @return Mixed + * @return mixed * @access public */ function _dir_readdir() @@ -565,7 +565,7 @@ class Stream /** * Rewind directory handle * - * @return Boolean + * @return bool * @access public */ function _dir_rewinddir() @@ -577,7 +577,7 @@ class Stream /** * Close directory handle * - * @return Boolean + * @return bool * @access public */ function _dir_closedir() @@ -590,10 +590,10 @@ class Stream * * Only valid $options is STREAM_MKDIR_RECURSIVE * - * @param String $path - * @param Integer $mode - * @param Integer $options - * @return Boolean + * @param string $path + * @param int $mode + * @param int $options + * @return bool * @access public */ 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 * $options. What does 8 correspond to? * - * @param String $path - * @param Integer $mode - * @param Integer $options - * @return Boolean + * @param string $path + * @param int $mode + * @param int $options + * @return bool * @access public */ function _rmdir($path, $options) @@ -635,7 +635,7 @@ class Stream * * See . Always returns true because \phpseclib\Net\SFTP doesn't cache stuff before writing * - * @return Boolean + * @return bool * @access public */ function _stream_flush() @@ -646,7 +646,7 @@ class Stream /** * Retrieve information about a file resource * - * @return Mixed + * @return mixed * @access public */ function _stream_stat() @@ -661,8 +661,8 @@ class Stream /** * Delete a file * - * @param String $path - * @return Boolean + * @param string $path + * @return bool * @access public */ 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 * cross that bridge when and if it's reached * - * @param String $path - * @param Integer $flags - * @return Mixed + * @param string $path + * @param int $flags + * @return mixed * @access public */ function _url_stat($path, $flags) @@ -705,8 +705,8 @@ class Stream /** * Truncate stream * - * @param Integer $new_size - * @return Boolean + * @param int $new_size + * @return bool * @access public */ 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. * The other two aren't supported because of limitations in \phpseclib\Net\SFTP. * - * @param Integer $option - * @param Integer $arg1 - * @param Integer $arg2 - * @return Boolean + * @param int $option + * @param int $arg1 + * @param int $arg2 + * @return bool * @access public */ 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 * NET_SFTP_STREAM_LOGGING is enabled) the parameters will be passed through to the appropriate method. * - * @param String - * @param Array - * @return Mixed + * @param string + * @param array + * @return mixed * @access public */ function __call($name, $arguments) diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index 15e37061..293ba931 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -224,7 +224,7 @@ class SSH1 /** * The SSH identifier * - * @var String + * @var string * @access private */ var $identifier = 'SSH-1.5-phpseclib'; @@ -232,7 +232,7 @@ class SSH1 /** * The Socket Object * - * @var Object + * @var object * @access private */ var $fsock; @@ -240,7 +240,7 @@ class SSH1 /** * The cryptography object * - * @var Object + * @var object * @access private */ 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 * if a requisite function has been successfully executed. If not, an error should be thrown. * - * @var Integer + * @var int * @access private */ var $bitmap = 0; @@ -262,7 +262,7 @@ class SSH1 * Logged for debug purposes * * @see \phpseclib\Net\SSH1::getServerKeyPublicExponent() - * @var String + * @var string * @access private */ var $server_key_public_exponent; @@ -273,7 +273,7 @@ class SSH1 * Logged for debug purposes * * @see \phpseclib\Net\SSH1::getServerKeyPublicModulus() - * @var String + * @var string * @access private */ var $server_key_public_modulus; @@ -284,7 +284,7 @@ class SSH1 * Logged for debug purposes * * @see \phpseclib\Net\SSH1::getHostKeyPublicExponent() - * @var String + * @var string * @access private */ var $host_key_public_exponent; @@ -295,7 +295,7 @@ class SSH1 * Logged for debug purposes * * @see \phpseclib\Net\SSH1::getHostKeyPublicModulus() - * @var String + * @var string * @access private */ var $host_key_public_modulus; @@ -306,7 +306,7 @@ class SSH1 * Logged for debug purposes * * @see \phpseclib\Net\SSH1::getSupportedCiphers() - * @var Array + * @var array * @access private */ var $supported_ciphers = array( @@ -325,7 +325,7 @@ class SSH1 * Logged for debug purposes * * @see \phpseclib\Net\SSH1::getSupportedAuthentications() - * @var Array + * @var array * @access private */ var $supported_authentications = array( @@ -339,7 +339,7 @@ class SSH1 * Server Identification * * @see \phpseclib\Net\SSH1::getServerIdentification() - * @var String + * @var string * @access private */ var $server_identification = ''; @@ -348,7 +348,7 @@ class SSH1 * Protocol Flags * * @see \phpseclib\Net\SSH1::__construct() - * @var Array + * @var array * @access private */ var $protocol_flags = array(); @@ -357,7 +357,7 @@ class SSH1 * Protocol Flag Log * * @see \phpseclib\Net\SSH1::getLog() - * @var Array + * @var array * @access private */ var $protocol_flag_log = array(); @@ -366,7 +366,7 @@ class SSH1 * Message Log * * @see \phpseclib\Net\SSH1::getLog() - * @var Array + * @var array * @access private */ var $message_log = array(); @@ -375,7 +375,7 @@ class SSH1 * Real-time log file pointer * * @see \phpseclib\Net\SSH1::_append_log() - * @var Resource + * @var resource * @access private */ var $realtime_log_file; @@ -384,7 +384,7 @@ class SSH1 * Real-time log file size * * @see \phpseclib\Net\SSH1::_append_log() - * @var Integer + * @var int * @access private */ var $realtime_log_size; @@ -393,7 +393,7 @@ class SSH1 * Real-time log file wrap boolean * * @see \phpseclib\Net\SSH1::_append_log() - * @var Boolean + * @var bool * @access private */ var $realtime_log_wrap; @@ -402,7 +402,7 @@ class SSH1 * Interactive Buffer * * @see \phpseclib\Net\SSH1::read() - * @var Array + * @var array * @access private */ var $interactiveBuffer = ''; @@ -452,7 +452,7 @@ class SSH1 * * @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::_connect() - * @var String + * @var string * @access private */ var $host; @@ -462,7 +462,7 @@ class SSH1 * * @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::_connect() - * @var Integer + * @var int * @access private */ var $port; @@ -477,7 +477,7 @@ class SSH1 * * @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::_connect() - * @var Integer + * @var int * @access private */ var $connectionTimeout; @@ -487,7 +487,7 @@ class SSH1 * * @see \phpseclib\Net\SSH1::__construct() * @see \phpseclib\Net\SSH1::_connect() - * @var Integer + * @var int * @access private */ var $cipher; @@ -497,10 +497,10 @@ class SSH1 * * Connects to an SSHv1 server * - * @param String $host - * @param Integer $port - * @param Integer $timeout - * @param Integer $cipher + * @param string $host + * @param int $port + * @param int $timeout + * @param int $cipher * @return \phpseclib\Net\SSH1 * @access public */ @@ -536,7 +536,7 @@ class SSH1 /** * Connect to an SSHv1 server * - * @return Boolean + * @return bool * @access private */ function _connect() @@ -694,9 +694,9 @@ class SSH1 /** * Login * - * @param String $username - * @param String $password - * @return Boolean + * @param string $username + * @param string $password + * @return bool * @access public */ 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. * Setting $timeout to false or 0 will mean there is no timeout. * - * @param Mixed $timeout + * @param mixed $timeout */ function setTimeout($timeout) { @@ -790,7 +790,7 @@ class SSH1 * * @see \phpseclib\Net\SSH1::interactiveRead() * @see \phpseclib\Net\SSH1::interactiveWrite() - * @param String $cmd + * @param string $cmd * @return mixed * @access public */ @@ -840,7 +840,7 @@ class SSH1 * * @see \phpseclib\Net\SSH1::interactiveRead() * @see \phpseclib\Net\SSH1::interactiveWrite() - * @return Boolean + * @return bool * @access private */ function _initShell() @@ -883,8 +883,8 @@ class SSH1 * Inputs a command into an interactive shell. * * @see \phpseclib\Net\SSH1::interactiveWrite() - * @param String $cmd - * @return Boolean + * @param string $cmd + * @return bool * @access public */ function write($cmd) @@ -899,9 +899,9 @@ class SSH1 * a regular expression. * * @see \phpseclib\Net\SSH1::write() - * @param String $expect - * @param Integer $mode - * @return Boolean + * @param string $expect + * @param int $mode + * @return bool * @access public */ function read($expect, $mode = self::READ__SIMPLE) @@ -939,8 +939,8 @@ class SSH1 * Inputs a command into an interactive shell. * * @see \phpseclib\Net\SSH1::interactiveRead() - * @param String $cmd - * @return Boolean + * @param string $cmd + * @return bool * @access public */ function interactiveWrite($cmd) @@ -975,7 +975,7 @@ class SSH1 * there's not going to be much recourse. * * @see \phpseclib\Net\SSH1::interactiveRead() - * @return String + * @return string * @access public */ function interactiveRead() @@ -1026,7 +1026,7 @@ class SSH1 /** * Disconnect * - * @param String $msg + * @param string $msg * @access private */ function _disconnect($msg = 'Client Quit') @@ -1064,7 +1064,7 @@ class SSH1 * http://www.securiteam.com/securitynews/5LP042K3FY.html * * @see \phpseclib\Net\SSH1::_send_binary_packet() - * @return Array + * @return array * @access private */ function _get_binary_packet() @@ -1140,8 +1140,8 @@ class SSH1 * Returns true on success, false on failure. * * @see \phpseclib\Net\SSH1::_get_binary_packet() - * @param String $data - * @return Boolean + * @param string $data + * @return bool * @access private */ function _send_binary_packet($data) @@ -1188,8 +1188,8 @@ class SSH1 * * @see \phpseclib\Net\SSH1::_get_binary_packet() * @see \phpseclib\Net\SSH1::_send_binary_packet() - * @param String $data - * @return Integer + * @param string $data + * @return int * @access private */ function _crc($data) @@ -1284,9 +1284,9 @@ class SSH1 * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) @@ -1305,7 +1305,7 @@ class SSH1 * * @see \phpseclib\Net\SSH1::__construct() * @param BigInteger $m - * @param Array $key + * @param array $key * @return BigInteger * @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. * 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 */ 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') * * @access public - * @return String or Array + * @return string or Array */ function getLog() { @@ -1400,10 +1400,10 @@ class SSH1 /** * Formats a log for printing * - * @param Array $message_log - * @param Array $message_number_log + * @param array $message_log + * @param array $message_number_log * @access private - * @return String + * @return string */ function _format_log($message_log, $message_number_log) { @@ -1436,9 +1436,9 @@ class SSH1 * * For use with preg_replace_callback() * - * @param Array $matches + * @param array $matches * @access private - * @return String + * @return string */ 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, * the raw bytes. This behavior is similar to PHP's md5() function. * - * @param Boolean $raw_output - * @return String + * @param bool $raw_output + * @return string * @access public */ 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, * the raw bytes. This behavior is similar to PHP's md5() function. * - * @param Boolean $raw_output - * @return String + * @param bool $raw_output + * @return string * @access public */ 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, * the raw bytes. This behavior is similar to PHP's md5() function. * - * @param Boolean $raw_output - * @return String + * @param bool $raw_output + * @return string * @access public */ 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, * the raw bytes. This behavior is similar to PHP's md5() function. * - * @param Boolean $raw_output - * @return String + * @param bool $raw_output + * @return string * @access public */ 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 * get array(self::CIPHER_3DES). * - * @param Boolean $raw_output - * @return Array + * @param bool $raw_output + * @return array * @access public */ 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 * get array(self::AUTH_PASSWORD). * - * @param Boolean $raw_output - * @return Array + * @param bool $raw_output + * @return array * @access public */ function getSupportedAuthentications($raw_output = false) @@ -1540,7 +1540,7 @@ class SSH1 /** * Return the server identification. * - * @return String + * @return string * @access public */ function getServerIdentification() @@ -1553,7 +1553,7 @@ class SSH1 * * Makes sure that only the last 1MB worth of packets will be logged * - * @param String $data + * @param string $data * @access private */ function _append_log($protocol_flags, $message) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 48e9c9de..232abe83 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -149,7 +149,7 @@ class SSH2 /** * The SSH identifier * - * @var String + * @var string * @access private */ var $identifier; @@ -157,7 +157,7 @@ class SSH2 /** * The Socket Object * - * @var Object + * @var object * @access private */ var $fsock; @@ -168,7 +168,7 @@ class SSH2 * 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. * - * @var Integer + * @var int * @access private */ var $bitmap = 0; @@ -178,7 +178,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::getErrors() * @see \phpseclib\Net\SSH2::getLastError() - * @var String + * @var string * @access private */ var $errors = array(); @@ -205,7 +205,7 @@ class SSH2 * Minimum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods * * @see Net_SSH2::_key_exchange() - * @var Integer + * @var int * @access private */ var $kex_dh_group_size_min = 1536; @@ -214,7 +214,7 @@ class SSH2 * Preferred Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods * * @see Net_SSH2::_key_exchange() - * @var Integer + * @var int * @access private */ var $kex_dh_group_size_preferred = 2048; @@ -223,7 +223,7 @@ class SSH2 * Maximum Diffie-Hellman Group Bit Size in RFC 4419 Key Exchange Methods * * @see Net_SSH2::_key_exchange() - * @var Integer + * @var int * @access private */ var $kex_dh_group_size_max = 4096; @@ -321,7 +321,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::__construct() * @see \phpseclib\Net\SSH2::_send_binary_packet() - * @var Integer + * @var int * @access private */ var $encrypt_block_size = 8; @@ -331,7 +331,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::__construct() * @see \phpseclib\Net\SSH2::_get_binary_packet() - * @var Integer + * @var int * @access private */ var $decrypt_block_size = 8; @@ -340,7 +340,7 @@ class SSH2 * Server to Client Encryption Object * * @see \phpseclib\Net\SSH2::_get_binary_packet() - * @var Object + * @var object * @access private */ var $decrypt = false; @@ -349,7 +349,7 @@ class SSH2 * Client to Server Encryption Object * * @see \phpseclib\Net\SSH2::_send_binary_packet() - * @var Object + * @var object * @access private */ var $encrypt = false; @@ -358,7 +358,7 @@ class SSH2 * Client to Server HMAC Object * * @see \phpseclib\Net\SSH2::_send_binary_packet() - * @var Object + * @var object * @access private */ var $hmac_create = false; @@ -367,7 +367,7 @@ class SSH2 * Server to Client HMAC Object * * @see \phpseclib\Net\SSH2::_get_binary_packet() - * @var Object + * @var object * @access private */ var $hmac_check = false; @@ -380,7 +380,7 @@ class SSH2 * append it. * * @see \phpseclib\Net\SSH2::_get_binary_packet() - * @var Integer + * @var int * @access private */ var $hmac_size = false; @@ -389,7 +389,7 @@ class SSH2 * Server Public Host Key * * @see \phpseclib\Net\SSH2::getServerPublicHostKey() - * @var String + * @var string * @access private */ var $server_public_host_key; @@ -404,7 +404,7 @@ class SSH2 * -- http://tools.ietf.org/html/rfc4253#section-7.2 * * @see \phpseclib\Net\SSH2::_key_exchange() - * @var String + * @var string * @access private */ var $session_id = false; @@ -415,7 +415,7 @@ class SSH2 * The current exchange hash * * @see \phpseclib\Net\SSH2::_key_exchange() - * @var String + * @var string * @access private */ var $exchange_hash = false; @@ -424,7 +424,7 @@ class SSH2 * Message Numbers * * @see \phpseclib\Net\SSH2::__construct() - * @var Array + * @var array * @access private */ var $message_numbers = array(); @@ -433,7 +433,7 @@ class SSH2 * Disconnection Message 'reason codes' defined in RFC4253 * * @see \phpseclib\Net\SSH2::__construct() - * @var Array + * @var array * @access private */ var $disconnect_reasons = array(); @@ -442,7 +442,7 @@ class SSH2 * SSH_MSG_CHANNEL_OPEN_FAILURE 'reason codes', defined in RFC4254 * * @see \phpseclib\Net\SSH2::__construct() - * @var Array + * @var array * @access private */ var $channel_open_failure_reasons = array(); @@ -452,7 +452,7 @@ class SSH2 * * @link http://tools.ietf.org/html/rfc4254#section-8 * @see \phpseclib\Net\SSH2::__construct() - * @var Array + * @var array * @access private */ var $terminal_modes = array(); @@ -462,7 +462,7 @@ class SSH2 * * @link http://tools.ietf.org/html/rfc4254#section-5.2 * @see \phpseclib\Net\SSH2::__construct() - * @var Array + * @var array * @access private */ var $channel_extended_data_type_codes = array(); @@ -473,7 +473,7 @@ class SSH2 * See 'Section 6.4. Data Integrity' of rfc4253 for more info. * * @see \phpseclib\Net\SSH2::_send_binary_packet() - * @var Integer + * @var int * @access private */ var $send_seq_no = 0; @@ -484,7 +484,7 @@ class SSH2 * See 'Section 6.4. Data Integrity' of rfc4253 for more info. * * @see \phpseclib\Net\SSH2::_get_binary_packet() - * @var Integer + * @var int * @access private */ var $get_seq_no = 0; @@ -496,7 +496,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::_get_channel_packet() * @see \phpseclib\Net\SSH2::exec() - * @var Array + * @var array * @access private */ var $server_channels = array(); @@ -509,7 +509,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::_get_channel_packet() * @see \phpseclib\Net\SSH2::exec() - * @var Array + * @var array * @access private */ var $channel_buffers = array(); @@ -520,7 +520,7 @@ class SSH2 * Contains the type of the last sent message * * @see \phpseclib\Net\SSH2::_get_channel_packet() - * @var Array + * @var array * @access private */ var $channel_status = array(); @@ -531,7 +531,7 @@ class SSH2 * Maximum packet size indexed by channel * * @see \phpseclib\Net\SSH2::_send_channel_packet() - * @var Array + * @var array * @access private */ var $packet_size_client_to_server = array(); @@ -540,7 +540,7 @@ class SSH2 * Message Number Log * * @see \phpseclib\Net\SSH2::getLog() - * @var Array + * @var array * @access private */ var $message_number_log = array(); @@ -549,7 +549,7 @@ class SSH2 * Message Log * * @see \phpseclib\Net\SSH2::getLog() - * @var Array + * @var array * @access private */ var $message_log = array(); @@ -559,7 +559,7 @@ class SSH2 * * Bytes the other party can send before it must wait for the window to be adjusted (0x7FFFFFFF = 2GB) * - * @var Integer + * @var int * @see \phpseclib\Net\SSH2::_send_channel_packet() * @see \phpseclib\Net\SSH2::exec() * @access private @@ -572,7 +572,7 @@ class SSH2 * Window size indexed by channel * * @see \phpseclib\Net\SSH2::_send_channel_packet() - * @var Array + * @var array * @access private */ var $window_size_server_to_client = array(); @@ -583,7 +583,7 @@ class SSH2 * Window size indexed by channel * * @see \phpseclib\Net\SSH2::_get_channel_packet() - * @var Array + * @var array * @access private */ var $window_size_client_to_server = array(); @@ -594,7 +594,7 @@ class SSH2 * Verified against $this->session_id * * @see \phpseclib\Net\SSH2::getServerPublicHostKey() - * @var String + * @var string * @access private */ var $signature = ''; @@ -605,7 +605,7 @@ class SSH2 * ssh-rsa or ssh-dss. * * @see \phpseclib\Net\SSH2::getServerPublicHostKey() - * @var String + * @var string * @access private */ var $signature_format = ''; @@ -614,7 +614,7 @@ class SSH2 * Interactive Buffer * * @see \phpseclib\Net\SSH2::read() - * @var Array + * @var array * @access private */ var $interactiveBuffer = ''; @@ -626,7 +626,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::_send_binary_packet() * @see \phpseclib\Net\SSH2::_get_binary_packet() - * @var Integer + * @var int * @access private */ var $log_size; @@ -651,7 +651,7 @@ class SSH2 * Real-time log file pointer * * @see \phpseclib\Net\SSH2::_append_log() - * @var Resource + * @var resource * @access private */ var $realtime_log_file; @@ -660,7 +660,7 @@ class SSH2 * Real-time log file size * * @see \phpseclib\Net\SSH2::_append_log() - * @var Integer + * @var int * @access private */ var $realtime_log_size; @@ -669,7 +669,7 @@ class SSH2 * Has the signature been validated? * * @see \phpseclib\Net\SSH2::getServerPublicHostKey() - * @var Boolean + * @var bool * @access private */ var $signature_validated = false; @@ -693,7 +693,7 @@ class SSH2 /** * Time of first network activity * - * @var Integer + * @var int * @access private */ var $last_packet; @@ -701,7 +701,7 @@ class SSH2 /** * Exit status returned from ssh if any * - * @var Integer + * @var int * @access private */ var $exit_status; @@ -709,7 +709,7 @@ class SSH2 /** * Flag to request a PTY when using exec() * - * @var Boolean + * @var bool * @see \phpseclib\Net\SSH2::enablePTY() * @access private */ @@ -718,7 +718,7 @@ class SSH2 /** * Flag set while exec() is running when using enablePTY() * - * @var Boolean + * @var bool * @access private */ var $in_request_pty_exec = false; @@ -726,7 +726,7 @@ class SSH2 /** * Flag set after startSubsystem() is called * - * @var Boolean + * @var bool * @access private */ var $in_subsystem; @@ -734,7 +734,7 @@ class SSH2 /** * Contents of stdError * - * @var String + * @var string * @access private */ var $stdErrorLog; @@ -743,7 +743,7 @@ class SSH2 * The Last Interactive Response * * @see \phpseclib\Net\SSH2::_keyboard_interactive_process() - * @var String + * @var string * @access private */ var $last_interactive_response = ''; @@ -752,7 +752,7 @@ class SSH2 * Keyboard Interactive Request / Responses * * @see \phpseclib\Net\SSH2::_keyboard_interactive_process() - * @var Array + * @var array * @access private */ var $keyboard_requests_responses = array(); @@ -765,7 +765,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::_filter() * @see \phpseclib\Net\SSH2::getBannerMessage() - * @var String + * @var string * @access private */ var $banner_message = ''; @@ -774,7 +774,7 @@ class SSH2 * Did read() timeout or return normally? * * @see \phpseclib\Net\SSH2::isTimeout() - * @var Boolean + * @var bool * @access private */ var $is_timeout = false; @@ -783,7 +783,7 @@ class SSH2 * Log Boundary * * @see \phpseclib\Net\SSH2::_format_log() - * @var String + * @var string * @access private */ var $log_boundary = ':'; @@ -792,7 +792,7 @@ class SSH2 * Log Long Width * * @see \phpseclib\Net\SSH2::_format_log() - * @var Integer + * @var int * @access private */ var $log_long_width = 65; @@ -801,7 +801,7 @@ class SSH2 * Log Short Width * * @see \phpseclib\Net\SSH2::_format_log() - * @var Integer + * @var int * @access private */ var $log_short_width = 16; @@ -811,7 +811,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::__construct() * @see \phpseclib\Net\SSH2::_connect() - * @var String + * @var string * @access private */ var $host; @@ -821,7 +821,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::__construct() * @see \phpseclib\Net\SSH2::_connect() - * @var Integer + * @var int * @access private */ var $port; @@ -832,7 +832,7 @@ class SSH2 * @see \phpseclib\Net\SSH2::getWindowColumns() * @see \phpseclib\Net\SSH2::setWindowColumns() * @see \phpseclib\Net\SSH2::setWindowSize() - * @var Integer + * @var int * @access private */ var $windowColumns = 80; @@ -843,7 +843,7 @@ class SSH2 * @see \phpseclib\Net\SSH2::getWindowRows() * @see \phpseclib\Net\SSH2::setWindowRows() * @see \phpseclib\Net\SSH2::setWindowSize() - * @var Integer + * @var int * @access private */ var $windowRows = 24; @@ -853,7 +853,7 @@ class SSH2 * * @see Net_SSH2::setCryptoEngine() * @see Net_SSH2::_key_exchange() - * @var Integer + * @var int * @access private */ var $crypto_engine = false; @@ -871,9 +871,9 @@ class SSH2 * * $host can either be a string, representing the host, or a stream resource. * - * @param Mixed $host - * @param Integer $port - * @param Integer $timeout + * @param mixed $host + * @param int $port + * @param int $timeout * @see \phpseclib\Net\SSH2::login() * @return \phpseclib\Net\SSH2 * @access public @@ -977,7 +977,7 @@ class SSH2 * Possible $engine values: * CRYPT_MODE_INTERNAL, CRYPT_MODE_MCRYPT * - * @param Integer $engine + * @param int $engine * @access private */ function setCryptoEngine($engine) @@ -988,7 +988,7 @@ class SSH2 /** * Connect to an SSHv2 server * - * @return Boolean + * @return bool * @access private */ function _connect() @@ -1109,7 +1109,7 @@ class SSH2 * You should overwrite this method in your own class if you want to use another identifier * * @access protected - * @return String + * @return string */ function _generate_identifier() { @@ -1142,7 +1142,7 @@ class SSH2 /** * Key Exchange * - * @param String $kexinit_payload_server + * @param string $kexinit_payload_server * @access private */ function _key_exchange($kexinit_payload_server) @@ -1756,8 +1756,8 @@ class SSH2 /** * Maps an encryption algorithm name to the number of key bytes. * - * @param String $algorithm Name of the encryption algorithm - * @return Mixed Number of bytes as an integer or null for unknown + * @param string $algorithm Name of the encryption algorithm + * @return mixed Number of bytes as an integer or null for unknown * @access private */ function _encryption_algorithm_to_key_size($algorithm) @@ -1796,8 +1796,8 @@ class SSH2 * Maps an encryption algorithm name to an instance of a subclass of * \phpseclib\Crypt\Base. * - * @param String $algorithm Name of the encryption algorithm - * @return Mixed Instance of \phpseclib\Crypt\Base or null for unknown + * @param string $algorithm Name of the encryption algorithm + * @return mixed Instance of \phpseclib\Crypt\Base or null for unknown * @access private */ function _encryption_algorithm_to_crypt_instance($algorithm) @@ -1841,10 +1841,10 @@ class SSH2 * * The $password parameter can be a plaintext password, a \phpseclib\Crypt\RSA object or an array * - * @param String $username - * @param Mixed $password - * @param Mixed $... - * @return Boolean + * @param string $username + * @param mixed $password + * @param mixed $... + * @return bool * @see _login * @access public */ @@ -1857,10 +1857,10 @@ class SSH2 /** * Login Helper * - * @param String $username - * @param Mixed $password - * @param Mixed $... - * @return Boolean + * @param string $username + * @param mixed $password + * @param mixed $... + * @return bool * @see _login_helper * @access private */ @@ -1888,9 +1888,9 @@ class SSH2 /** * Login Helper * - * @param String $username - * @param String $password - * @return Boolean + * @param string $username + * @param string $password + * @return bool * @access private * @internal It might be worthwhile, at some point, to protect against {@link http://tools.ietf.org/html/rfc4251#section-9.3.9 traffic analysis} * by sending dummy SSH_MSG_IGNORE messages. @@ -2062,9 +2062,9 @@ class SSH2 * * See {@link http://tools.ietf.org/html/rfc4256 RFC4256} for details. This is not a full-featured keyboard-interactive authenticator. * - * @param String $username - * @param String $password - * @return Boolean + * @param string $username + * @param string $password + * @return bool * @access private */ function _keyboard_interactive_login($username, $password) @@ -2094,8 +2094,8 @@ class SSH2 /** * Handle the keyboard-interactive requests / responses. * - * @param String $responses... - * @return Boolean + * @param string $responses... + * @return bool * @access private */ function _keyboard_interactive_process() @@ -2208,9 +2208,9 @@ class SSH2 /** * Login with an ssh-agent provided key * - * @param String $username + * @param string $username * @param \phpseclib\System\SSH\Agent $agent - * @return Boolean + * @return bool * @access private */ function _ssh_agent_login($username, $agent) @@ -2229,9 +2229,9 @@ class SSH2 /** * Login with an RSA private key * - * @param String $username + * @param string $username * @param \phpseclib\Crypt\RSA $password - * @return Boolean + * @return bool * @access private * @internal It might be worthwhile, at some point, to protect against {@link http://tools.ietf.org/html/rfc4251#section-9.3.9 traffic analysis} * by sending dummy SSH_MSG_IGNORE messages. @@ -2336,7 +2336,7 @@ class SSH2 * $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. * - * @param Mixed $timeout + * @param mixed $timeout * @access public */ function setTimeout($timeout) @@ -2360,9 +2360,9 @@ class SSH2 * If $callback is set to false then \phpseclib\Net\SSH2::_get_channel_packet(self::CHANNEL_EXEC) will need to be called manually. * In all likelihood, this is not a feature you want to be taking advantage of. * - * @param String $command + * @param string $command * @param Callback $callback - * @return String + * @return string * @access public */ function exec($command, $callback = null) @@ -2509,7 +2509,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::read() * @see \phpseclib\Net\SSH2::write() - * @return Boolean + * @return bool * @access private */ function _initShell() @@ -2613,7 +2613,7 @@ class SSH2 * * @see \phpseclib\Net\SSH2::read() * @see \phpseclib\Net\SSH2::write() - * @return Integer + * @return int * @access public */ function _get_interactive_channel() @@ -2631,7 +2631,7 @@ class SSH2 /** * Return an available open channel * - * @return Integer + * @return int * @access public */ function _get_open_channel() @@ -2653,9 +2653,9 @@ class SSH2 * if $mode == self::READ_REGEX, a regular expression. * * @see \phpseclib\Net\SSH2::write() - * @param String $expect - * @param Integer $mode - * @return String + * @param string $expect + * @param int $mode + * @return string * @access public */ function read($expect = '', $mode = self::READ_SIMPLE) @@ -2699,8 +2699,8 @@ class SSH2 * Inputs a command into an interactive shell. * * @see \phpseclib\Net\SSH2::read() - * @param String $cmd - * @return Boolean + * @param string $cmd + * @return bool * @access public */ function write($cmd) @@ -2728,8 +2728,8 @@ class SSH2 * if there's sufficient demand for such a feature. * * @see \phpseclib\Net\SSH2::stopSubsystem() - * @param String $subsystem - * @return Boolean + * @param string $subsystem + * @return bool * @access public */ function startSubsystem($subsystem) @@ -2791,7 +2791,7 @@ class SSH2 * Stops a subsystem. * * @see \phpseclib\Net\SSH2::startSubsystem() - * @return Boolean + * @return bool * @access public */ function stopSubsystem() @@ -2854,7 +2854,7 @@ class SSH2 /** * Is the connection still active? * - * @return boolean + * @return bool * @access public */ function isConnected() @@ -2868,7 +2868,7 @@ class SSH2 * See '6. Binary Packet Protocol' of rfc4253 for more info. * * @see \phpseclib\Net\SSH2::_send_binary_packet() - * @return String + * @return string * @access private */ function _get_binary_packet() @@ -2961,7 +2961,7 @@ class SSH2 * Because some binary packets need to be ignored... * * @see \phpseclib\Net\SSH2::_get_binary_packet() - * @return String + * @return string * @access private */ function _filter($payload) @@ -3113,7 +3113,7 @@ class SSH2 * @see \phpseclib\Net\SSH2::disableQuietMode() * * @access public - * @return boolean + * @return bool */ function isQuietModeEnabled() { @@ -3147,7 +3147,7 @@ class SSH2 * @see \phpseclib\Net\SSH2::disablePTY() * * @access public - * @return boolean + * @return bool */ function isPTYEnabled() { @@ -3160,7 +3160,7 @@ class SSH2 * Returns the data as a string if it's available and false if not. * * @param $client_channel - * @return Mixed + * @return mixed * @access private */ function _get_channel_packet($client_channel, $skip_extended = false) @@ -3375,10 +3375,10 @@ class SSH2 * * See '6. Binary Packet Protocol' of rfc4253 for more info. * - * @param String $data - * @param String $logged + * @param string $data + * @param string $logged * @see \phpseclib\Net\SSH2::_get_binary_packet() - * @return Boolean + * @return bool * @access private */ function _send_binary_packet($data, $logged = null) @@ -3436,7 +3436,7 @@ class SSH2 * * Makes sure that only the last 1MB worth of packets will be logged * - * @param String $data + * @param string $data * @access private */ function _append_log($message_number, $message) @@ -3512,9 +3512,9 @@ class SSH2 * * Spans multiple SSH_MSG_CHANNEL_DATAs if appropriate * - * @param Integer $client_channel - * @param String $data - * @return Boolean + * @param int $client_channel + * @param string $data + * @return bool * @access private */ function _send_channel_packet($client_channel, $data) @@ -3560,9 +3560,9 @@ class SSH2 * and for SFTP channels are presumably closed when the client disconnects. This functions is intended * for SCP more than anything. * - * @param Integer $client_channel - * @param Boolean $want_reply - * @return Boolean + * @param int $client_channel + * @param bool $want_reply + * @return bool * @access private */ function _close_channel($client_channel, $want_reply = false) @@ -3594,8 +3594,8 @@ class SSH2 /** * Disconnect * - * @param Integer $reason - * @return Boolean + * @param int $reason + * @return bool * @access private */ function _disconnect($reason) @@ -3614,9 +3614,9 @@ class SSH2 * * Inspired by array_shift * - * @param String $string - * @param Integer $index - * @return String + * @param string $string + * @param int $index + * @return string * @access private */ function _string_shift(&$string, $index = 1) @@ -3633,7 +3633,7 @@ class SSH2 * 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. * - * @param Array $array + * @param array $array * @access private */ function _define_array() @@ -3656,7 +3656,7 @@ class SSH2 * Returns a string if NET_SSH2_LOGGING == self::LOG_COMPLEX, an array if NET_SSH2_LOGGING == self::LOG_SIMPLE and false if !defined('NET_SSH2_LOGGING') * * @access public - * @return String or Array + * @return string or Array */ function getLog() { @@ -3679,10 +3679,10 @@ class SSH2 /** * Formats a log for printing * - * @param Array $message_log - * @param Array $message_number_log + * @param array $message_log + * @param array $message_number_log * @access private - * @return String + * @return string */ function _format_log($message_log, $message_number_log) { @@ -3715,9 +3715,9 @@ class SSH2 * * For use with preg_replace_callback() * - * @param Array $matches + * @param array $matches * @access private - * @return String + * @return string */ function _format_log_helper($matches) { @@ -3744,9 +3744,9 @@ class SSH2 * Returns the first value of the intersection of two arrays or false if * the intersection is empty. The order is defined by the first parameter. * - * @param Array $array1 - * @param Array $array2 - * @return Mixed False if intersection is empty, else intersected value. + * @param array $array1 + * @param array $array2 + * @return mixed False if intersection is empty, else intersected value. * @access private */ function _array_intersect_first($array1, $array2) @@ -3762,7 +3762,7 @@ class SSH2 /** * Returns all errors * - * @return String + * @return string * @access public */ function getErrors() @@ -3773,7 +3773,7 @@ class SSH2 /** * Returns the last error * - * @return String + * @return string * @access public */ function getLastError() @@ -3784,7 +3784,7 @@ class SSH2 /** * Return the server identification. * - * @return String + * @return string * @access public */ function getServerIdentification() @@ -3797,7 +3797,7 @@ class SSH2 /** * Return a list of the key exchange algorithms the server supports. * - * @return Array + * @return array * @access public */ function getKexAlgorithms() @@ -3810,7 +3810,7 @@ class SSH2 /** * Return a list of the host key (public key) algorithms the server supports. * - * @return Array + * @return array * @access public */ function getServerHostKeyAlgorithms() @@ -3823,7 +3823,7 @@ class SSH2 /** * Return a list of the (symmetric key) encryption algorithms the server supports, when receiving stuff from the client. * - * @return Array + * @return array * @access public */ function getEncryptionAlgorithmsClient2Server() @@ -3836,7 +3836,7 @@ class SSH2 /** * Return a list of the (symmetric key) encryption algorithms the server supports, when sending stuff to the client. * - * @return Array + * @return array * @access public */ function getEncryptionAlgorithmsServer2Client() @@ -3849,7 +3849,7 @@ class SSH2 /** * Return a list of the MAC algorithms the server supports, when receiving stuff from the client. * - * @return Array + * @return array * @access public */ function getMACAlgorithmsClient2Server() @@ -3862,7 +3862,7 @@ class SSH2 /** * Return a list of the MAC algorithms the server supports, when sending stuff to the client. * - * @return Array + * @return array * @access public */ function getMACAlgorithmsServer2Client() @@ -3875,7 +3875,7 @@ class SSH2 /** * Return a list of the compression algorithms the server supports, when receiving stuff from the client. * - * @return Array + * @return array * @access public */ function getCompressionAlgorithmsClient2Server() @@ -3888,7 +3888,7 @@ class SSH2 /** * Return a list of the compression algorithms the server supports, when sending stuff to the client. * - * @return Array + * @return array * @access public */ function getCompressionAlgorithmsServer2Client() @@ -3901,7 +3901,7 @@ class SSH2 /** * Return a list of the languages the server supports, when sending stuff to the client. * - * @return Array + * @return array * @access public */ function getLanguagesServer2Client() @@ -3914,7 +3914,7 @@ class SSH2 /** * Return a list of the languages the server supports, when receiving stuff from the client. * - * @return Array + * @return array * @access public */ function getLanguagesClient2Server() @@ -3930,7 +3930,7 @@ class SSH2 * Quoting from the RFC, "in some jurisdictions, sending a warning message before * authentication may be relevant for getting legal protection." * - * @return String + * @return string * @access public */ function getBannerMessage() @@ -3944,7 +3944,7 @@ class SSH2 * Caching this the first time you connect to a server and checking the result on subsequent connections * is recommended. Returns false if the server signature is not signed correctly with the public host key. * - * @return Mixed + * @return mixed * @access public */ function getServerPublicHostKey() @@ -4085,7 +4085,7 @@ class SSH2 /** * Returns the exit status of an SSH command or false. * - * @return Integer or false + * @return int or false * @access public */ function getExitStatus() @@ -4099,7 +4099,7 @@ class SSH2 /** * Returns the number of columns for the terminal window size. * - * @return Integer + * @return int * @access public */ function getWindowColumns() @@ -4110,7 +4110,7 @@ class SSH2 /** * Returns the number of rows for the terminal window size. * - * @return Integer + * @return int * @access public */ function getWindowRows() @@ -4121,7 +4121,7 @@ class SSH2 /** * Sets the number of columns for the terminal window size. * - * @param Integer $value + * @param int $value * @access public */ function setWindowColumns($value) @@ -4132,7 +4132,7 @@ class SSH2 /** * Sets the number of rows for the terminal window size. * - * @param Integer $value + * @param int $value * @access public */ function setWindowRows($value) @@ -4143,8 +4143,8 @@ class SSH2 /** * Sets the number of columns and rows for the terminal window size. * - * @param Integer $columns - * @param Integer $rows + * @param int $columns + * @param int $rows * @access public */ function setWindowSize($columns = 80, $rows = 24) diff --git a/phpseclib/System/SSH/Agent.php b/phpseclib/System/SSH/Agent.php index 4cb9dec0..23ef69e5 100644 --- a/phpseclib/System/SSH/Agent.php +++ b/phpseclib/System/SSH/Agent.php @@ -83,7 +83,7 @@ class Agent /** * Socket Resource * - * @var Resource + * @var resource * @access private */ var $fsock; @@ -143,7 +143,7 @@ class Agent * See "2.5.2 Requesting a list of protocol 2 keys" * Returns an array containing zero or more \phpseclib\System\SSH\Agent\Identity objects * - * @return Array + * @return array * @access public */ function requestIdentities() @@ -199,7 +199,7 @@ class Agent * be requested when a channel is opened * * @param Net_SSH2 $ssh - * @return Boolean + * @return bool * @access public */ function startSSHForwarding($ssh) @@ -213,7 +213,7 @@ class Agent * Request agent forwarding of remote server * * @param Net_SSH2 $ssh - * @return Boolean + * @return bool * @access private */ function _request_forwarding($ssh) @@ -269,7 +269,7 @@ class Agent /** * Forward data to SSH Agent and return data reply * - * @param String $data + * @param string $data * @return data from SSH Agent * @access private */ diff --git a/phpseclib/System/SSH/Agent/Identity.php b/phpseclib/System/SSH/Agent/Identity.php index 490edf6e..f52bc31c 100644 --- a/phpseclib/System/SSH/Agent/Identity.php +++ b/phpseclib/System/SSH/Agent/Identity.php @@ -45,7 +45,7 @@ class Identity /** * Key Blob * - * @var String + * @var string * @access private * @see \phpseclib\System\SSH\Agent\Identity::sign() */ @@ -54,7 +54,7 @@ class Identity /** * Socket Resource * - * @var Resource + * @var resource * @access private * @see \phpseclib\System\SSH\Agent\Identity::sign() */ @@ -63,7 +63,7 @@ class Identity /** * Default Constructor. * - * @param Resource $fsock + * @param resource $fsock * @return \phpseclib\System\SSH\Agent\Identity * @access private */ @@ -92,7 +92,7 @@ class Identity * Called by \phpseclib\System\SSH\Agent::requestIdentities(). The key blob could be extracted from $this->key * but this saves a small amount of computation. * - * @param String $key_blob + * @param string $key_blob * @access private */ function setPublicKeyBlob($key_blob) @@ -105,8 +105,8 @@ class Identity * * Wrapper for $this->key->getPublicKey() * - * @param Integer $format optional - * @return Mixed + * @param int $format optional + * @return mixed * @access public */ 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. * ssh-agent's only supported mode is \phpseclib\Crypt\RSA::SIGNATURE_PKCS1 * - * @param Integer $mode + * @param int $mode * @access public */ function setSignatureMode($mode) @@ -132,8 +132,8 @@ class Identity * * See "2.6.2 Protocol 2 private key signature request" * - * @param String $message - * @return String + * @param string $message + * @return string * @access public */ function sign($message)