diff --git a/phpseclib/Crypt/Base.php b/phpseclib/Crypt/Base.php index e51d1a07..cad9c382 100644 --- a/phpseclib/Crypt/Base.php +++ b/phpseclib/Crypt/Base.php @@ -2584,7 +2584,7 @@ class Crypt_Base * * @see self::_setupInlineCrypt() * @access private - * @param $bytes + * @param string $bytes * @return string */ function _hashInlineCryptFunction($bytes) diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index a998b5b2..d0cb2a15 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -191,7 +191,7 @@ class Crypt_Hash * PHP4 compatible Default Constructor. * * @see self::__construct() - * @param int $mode + * @param string $hash * @access public */ function Crypt_Hash($hash = 'sha1') @@ -879,7 +879,6 @@ 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 int $... * @return int * @see self::_sha256() * @access private diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index db037fe4..28309e5b 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -589,7 +589,7 @@ class Crypt_RSA * @access public * @param int $bits * @param int $timeout - * @param Math_BigInteger $p + * @param array $partial */ function createKey($bits = 1024, $timeout = false, $partial = array()) { @@ -768,7 +768,12 @@ class Crypt_RSA * * @access private * @see self::setPrivateKeyFormat() - * @param string $RSAPrivateKey + * @param Math_BigInteger $n + * @param Math_BigInteger $e + * @param Math_BigInteger $d + * @param array $primes + * @param array $exponents + * @param array $coefficients * @return string */ function _convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients) @@ -1061,8 +1066,9 @@ class Crypt_RSA * * @access private * @see self::setPublicKeyFormat() - * @param string $RSAPrivateKey - * @return string + * @param Math_BigInteger $n + * @param Math_BigInteger $e + * @return string|array */ function _convertPublicKey($n, $e) { @@ -1964,7 +1970,6 @@ class Crypt_RSA * * @see self::getPublicKey() * @access public - * @param string $key * @param int $type optional */ function getPublicKey($type = CRYPT_RSA_PUBLIC_FORMAT_PKCS8) @@ -2022,7 +2027,6 @@ class Crypt_RSA * * @see self::getPublicKey() * @access public - * @param string $key * @param int $type optional * @return mixed */ @@ -2047,8 +2051,7 @@ class Crypt_RSA * * @see self::getPrivateKey() * @access private - * @param string $key - * @param int $type optional + * @param int $mode optional */ function _getPrivatePublicKey($mode = CRYPT_RSA_PUBLIC_FORMAT_PKCS8) { @@ -2265,7 +2268,7 @@ class Crypt_RSA * of the hash function Hash) and 0. * * @access public - * @param int $format + * @param int $sLen */ function setSaltLength($sLen) { @@ -2298,7 +2301,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 int|string|resource $x * @return Math_BigInteger */ function _os2ip($x) @@ -2525,7 +2528,7 @@ class Crypt_RSA * * @access private * @param string $mgfSeed - * @param int $mgfLen + * @param int $maskLen * @return string */ function _mgf1($mgfSeed, $maskLen) @@ -3034,6 +3037,7 @@ class Crypt_RSA * * @access private * @param string $m + * @param string $s * @return string */ function _rsassa_pkcs1_v1_5_verify($m, $s) @@ -3174,7 +3178,7 @@ class Crypt_RSA * * @see self::encrypt() * @access public - * @param string $plaintext + * @param string $ciphertext * @return string */ function decrypt($ciphertext) diff --git a/phpseclib/File/ANSI.php b/phpseclib/File/ANSI.php index ac030df7..51693be8 100644 --- a/phpseclib/File/ANSI.php +++ b/phpseclib/File/ANSI.php @@ -230,8 +230,7 @@ class File_ANSI /** * Set the number of lines that should be logged past the terminal height * - * @param int $x - * @param int $y + * @param int $history * @access public */ function setHistory($history) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 98fe4b83..00c913b8 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -140,7 +140,7 @@ class File_ASN1_Element * PHP4 compatible Default Constructor. * * @see self::__construct() - * @param int $mode + * @param string $encoded * @access public */ function File_ASN1_Element($encoded) @@ -887,7 +887,7 @@ class File_ASN1 * * @param string $source * @param string $mapping - * @param int $idx + * @param array $special * @return string * @access public */ @@ -903,6 +903,7 @@ class File_ASN1 * @param string $source * @param string $mapping * @param int $idx + * @param array $special * @return string * @access private */ @@ -1262,7 +1263,7 @@ class File_ASN1 * Called by _encode_der() * * @access private - * @param string $content + * @param string $source * @return string */ function _encodeOID($source) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index ff4a31a2..57aaf29b 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -1638,7 +1638,7 @@ class File_X509 * Map extension values from octet string to extension-specific internal * format. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1691,7 +1691,7 @@ class File_X509 * Map extension values from extension-specific internal format to * octet string. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1757,7 +1757,7 @@ class File_X509 * Map attribute values from ANY type to attribute-specific internal * format. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1798,7 +1798,7 @@ class File_X509 * Map attribute values from attribute-specific internal format to * ANY type. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1841,7 +1841,7 @@ class File_X509 * Map DN values from ANY type to DN-specific internal * format. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1871,7 +1871,7 @@ class File_X509 * Map DN values from DN-specific internal format to * ANY type. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -3243,7 +3243,8 @@ class File_X509 /** * Load a Certificate Signing Request * - * @param string $csr + * @param string|array $csr + * @param int $mode * @access public * @return mixed */ @@ -3383,7 +3384,7 @@ class File_X509 * * https://developer.mozilla.org/en-US/docs/HTML/Element/keygen * - * @param string $csr + * @param string|array $spkac * @access public * @return mixed */ @@ -3457,7 +3458,7 @@ class File_X509 /** * Save a SPKAC CSR request * - * @param array $csr + * @param string|array $spkac * @param int $format optional * @access public * @return string @@ -3501,6 +3502,7 @@ class File_X509 * Load a Certificate Revocation List * * @param string $crl + * @param int $mode * @access public * @return mixed */ @@ -4114,7 +4116,6 @@ class File_X509 * X.509 certificate signing helper function. * * @param object $key - * @param File_X509 $subject * @param string $signatureAlgorithm * @access public * @return mixed @@ -4192,7 +4193,7 @@ class File_X509 * Set Serial Number * * @param string $serial - * @param $base optional + * @param int $base optional * @access public */ function setSerialNumber($serial, $base = -256) @@ -4866,7 +4867,6 @@ class File_X509 * Set the IP Addresses's which the cert is to be valid for * * @access public - * @param string $ipAddress optional */ function setIPAddress() { diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 35df7ada..f48b5ec6 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -237,7 +237,7 @@ class Math_BigInteger * ?> * * - * @param $x base-10 number or base-$base number if $base set. + * @param int|string|resource $x base-10 number or base-$base number if $base set. * @param int $base * @return Math_BigInteger * @access public @@ -2021,7 +2021,7 @@ class Math_BigInteger * * @see self::_slidingWindow() * @access private - * @param Math_BigInteger + * @param Math_BigInteger $n * @return Math_BigInteger */ function _mod2($n) @@ -3136,7 +3136,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 int $length + * @param int $size * @return Math_BigInteger * @access private */ @@ -3603,7 +3603,7 @@ class Math_BigInteger * * Removes leading zeros and truncates (if necessary) to maintain the appropriate precision * - * @param Math_BigInteger + * @param Math_BigInteger $result * @return Math_BigInteger * @see self::_trim() * @access private @@ -3680,8 +3680,8 @@ class Math_BigInteger /** * Array Repeat * - * @param $input Array - * @param $multiplier mixed + * @param array $input + * @param mixed $multiplier * @return array * @access private */ @@ -3695,8 +3695,8 @@ class Math_BigInteger * * Shifts binary strings $shift bits, essentially multiplying by 2**$shift. * - * @param $x String - * @param $shift Integer + * @param string $x (by reference) + * @param int $shift * @return string * @access private */ @@ -3724,8 +3724,8 @@ class Math_BigInteger * * Shifts binary strings $shift bits, essentially dividing by 2**$shift and returning the remainder. * - * @param $x String - * @param $shift Integer + * @param string $x (by referenc) + * @param int $shift * @return string * @access private */ diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 612f9b21..525f98ac 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -471,7 +471,6 @@ class Net_SFTP extends Net_SSH2 * Login * * @param string $username - * @param string $password * @return bool * @access public */ @@ -1286,7 +1285,7 @@ class Net_SFTP extends Net_SSH2 * * Mainly used by file_exists * - * @param string $dir + * @param string $path * @return mixed * @access private */ @@ -1841,6 +1840,8 @@ class Net_SFTP extends Net_SSH2 * Creates a directory. * * @param string $dir + * @param int $mode + * @param bool $recursive * @return bool * @access public */ @@ -1873,6 +1874,7 @@ class Net_SFTP extends Net_SSH2 * Helper function for directory creation * * @param string $dir + * @param int $mode * @return bool * @access private */ @@ -2796,6 +2798,7 @@ class Net_SFTP extends Net_SSH2 * * @param string $path * @param string $prop + * @param mixed $type * @return mixed * @access private */ @@ -3036,6 +3039,7 @@ class Net_SFTP extends Net_SSH2 * * @param int $type * @param string $data + * @param int $request_id * @see self::_get_sftp_packet() * @see Net_SSH2::_send_channel_packet() * @return bool diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index 4ec80996..842ebab5 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -644,7 +644,6 @@ class Net_SFTP_Stream * $options. What does 8 correspond to? * * @param string $path - * @param int $mode * @param int $options * @return bool * @access public @@ -786,8 +785,8 @@ 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 + * @param string $name + * @param array $arguments * @return mixed * @access public */ diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index bdb57dbd..76401a00 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -857,6 +857,7 @@ class Net_SSH1 * @see self::interactiveRead() * @see self::interactiveWrite() * @param string $cmd + * @param bool $block * @return mixed * @access public */ @@ -1434,7 +1435,6 @@ 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 * @access private */ function _define_array() @@ -1633,7 +1633,8 @@ class Net_SSH1 * * Makes sure that only the last 1MB worth of packets will be logged * - * @param string $data + * @param int $protocol_flags + * @param string $message * @access private */ function _append_log($protocol_flags, $message) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 2194d8f5..d3cbc1f4 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2122,8 +2122,6 @@ 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 bool * @see self::_login() * @access public @@ -2150,8 +2148,6 @@ class Net_SSH2 * Login Helper * * @param string $username - * @param mixed $password - * @param mixed $... * @return bool * @see self::_login_helper() * @access private @@ -2416,7 +2412,6 @@ class Net_SSH2 /** * Handle the keyboard-interactive requests / responses. * - * @param string $responses... * @return bool * @access private */ @@ -2561,7 +2556,7 @@ class Net_SSH2 * Login with an RSA private key * * @param string $username - * @param Crypt_RSA $password + * @param Crypt_RSA $privatekey * @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} @@ -3670,8 +3665,9 @@ class Net_SSH2 * * Returns the data as a string if it's available and false if not. * - * @param $client_channel - * @return mixed + * @param int $client_channel + * @param bool $skip_extended + * @return mixed|bool * @access private */ function _get_channel_packet($client_channel, $skip_extended = false) @@ -4001,7 +3997,8 @@ class Net_SSH2 * * Makes sure that only the last 1MB worth of packets will be logged * - * @param string $data + * @param string $message_number + * @param string $message * @access private */ function _append_log($message_number, $message) @@ -4206,7 +4203,6 @@ 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 * @access private */ function _define_array()