1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-12 17:17:26 +01:00

Fix phpdoc errors

This commit is contained in:
William Desportes 2020-08-21 18:18:18 +02:00
parent 2e9d5a99c7
commit 2ae683479a
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
11 changed files with 62 additions and 59 deletions

View File

@ -2584,7 +2584,7 @@ class Crypt_Base
* *
* @see self::_setupInlineCrypt() * @see self::_setupInlineCrypt()
* @access private * @access private
* @param $bytes * @param string $bytes
* @return string * @return string
*/ */
function _hashInlineCryptFunction($bytes) function _hashInlineCryptFunction($bytes)

View File

@ -191,7 +191,7 @@ class Crypt_Hash
* PHP4 compatible Default Constructor. * PHP4 compatible Default Constructor.
* *
* @see self::__construct() * @see self::__construct()
* @param int $mode * @param string $hash
* @access public * @access public
*/ */
function Crypt_Hash($hash = 'sha1') 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 * _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. * possibility of overflow exists, care has to be taken. Math_BigInteger() could be used but this should be faster.
* *
* @param int $...
* @return int * @return int
* @see self::_sha256() * @see self::_sha256()
* @access private * @access private

View File

@ -589,7 +589,7 @@ class Crypt_RSA
* @access public * @access public
* @param int $bits * @param int $bits
* @param int $timeout * @param int $timeout
* @param Math_BigInteger $p * @param array $partial
*/ */
function createKey($bits = 1024, $timeout = false, $partial = array()) function createKey($bits = 1024, $timeout = false, $partial = array())
{ {
@ -768,7 +768,12 @@ class Crypt_RSA
* *
* @access private * @access private
* @see self::setPrivateKeyFormat() * @see self::setPrivateKeyFormat()
* @param string $RSAPrivateKey * @param Math_BigInteger $n
* @param Math_BigInteger $e
* @param Math_BigInteger $d
* @param array<int,Math_BigInteger> $primes
* @param array<int,Math_BigInteger> $exponents
* @param array<int,Math_BigInteger> $coefficients
* @return string * @return string
*/ */
function _convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients) function _convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients)
@ -1061,8 +1066,9 @@ class Crypt_RSA
* *
* @access private * @access private
* @see self::setPublicKeyFormat() * @see self::setPublicKeyFormat()
* @param string $RSAPrivateKey * @param Math_BigInteger $n
* @return string * @param Math_BigInteger $e
* @return string|array<string,Math_BigInteger>
*/ */
function _convertPublicKey($n, $e) function _convertPublicKey($n, $e)
{ {
@ -1964,7 +1970,6 @@ class Crypt_RSA
* *
* @see self::getPublicKey() * @see self::getPublicKey()
* @access public * @access public
* @param string $key
* @param int $type optional * @param int $type optional
*/ */
function getPublicKey($type = CRYPT_RSA_PUBLIC_FORMAT_PKCS8) function getPublicKey($type = CRYPT_RSA_PUBLIC_FORMAT_PKCS8)
@ -2022,7 +2027,6 @@ class Crypt_RSA
* *
* @see self::getPublicKey() * @see self::getPublicKey()
* @access public * @access public
* @param string $key
* @param int $type optional * @param int $type optional
* @return mixed * @return mixed
*/ */
@ -2047,8 +2051,7 @@ class Crypt_RSA
* *
* @see self::getPrivateKey() * @see self::getPrivateKey()
* @access private * @access private
* @param string $key * @param int $mode optional
* @param int $type optional
*/ */
function _getPrivatePublicKey($mode = CRYPT_RSA_PUBLIC_FORMAT_PKCS8) function _getPrivatePublicKey($mode = CRYPT_RSA_PUBLIC_FORMAT_PKCS8)
{ {
@ -2265,7 +2268,7 @@ class Crypt_RSA
* of the hash function Hash) and 0. * of the hash function Hash) and 0.
* *
* @access public * @access public
* @param int $format * @param int $sLen
*/ */
function setSaltLength($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}. * See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}.
* *
* @access private * @access private
* @param string $x * @param int|string|resource $x
* @return Math_BigInteger * @return Math_BigInteger
*/ */
function _os2ip($x) function _os2ip($x)
@ -2525,7 +2528,7 @@ class Crypt_RSA
* *
* @access private * @access private
* @param string $mgfSeed * @param string $mgfSeed
* @param int $mgfLen * @param int $maskLen
* @return string * @return string
*/ */
function _mgf1($mgfSeed, $maskLen) function _mgf1($mgfSeed, $maskLen)
@ -3034,6 +3037,7 @@ class Crypt_RSA
* *
* @access private * @access private
* @param string $m * @param string $m
* @param string $s
* @return string * @return string
*/ */
function _rsassa_pkcs1_v1_5_verify($m, $s) function _rsassa_pkcs1_v1_5_verify($m, $s)
@ -3174,7 +3178,7 @@ class Crypt_RSA
* *
* @see self::encrypt() * @see self::encrypt()
* @access public * @access public
* @param string $plaintext * @param string $ciphertext
* @return string * @return string
*/ */
function decrypt($ciphertext) function decrypt($ciphertext)

View File

@ -230,8 +230,7 @@ class File_ANSI
/** /**
* Set the number of lines that should be logged past the terminal height * Set the number of lines that should be logged past the terminal height
* *
* @param int $x * @param int $history
* @param int $y
* @access public * @access public
*/ */
function setHistory($history) function setHistory($history)

View File

@ -140,7 +140,7 @@ class File_ASN1_Element
* PHP4 compatible Default Constructor. * PHP4 compatible Default Constructor.
* *
* @see self::__construct() * @see self::__construct()
* @param int $mode * @param string $encoded
* @access public * @access public
*/ */
function File_ASN1_Element($encoded) function File_ASN1_Element($encoded)
@ -887,7 +887,7 @@ class File_ASN1
* *
* @param string $source * @param string $source
* @param string $mapping * @param string $mapping
* @param int $idx * @param array $special
* @return string * @return string
* @access public * @access public
*/ */
@ -903,6 +903,7 @@ class File_ASN1
* @param string $source * @param string $source
* @param string $mapping * @param string $mapping
* @param int $idx * @param int $idx
* @param array $special
* @return string * @return string
* @access private * @access private
*/ */
@ -1262,7 +1263,7 @@ class File_ASN1
* Called by _encode_der() * Called by _encode_der()
* *
* @access private * @access private
* @param string $content * @param string $source
* @return string * @return string
*/ */
function _encodeOID($source) function _encodeOID($source)

View File

@ -1638,7 +1638,7 @@ class File_X509
* Map extension values from octet string to extension-specific internal * Map extension values from octet string to extension-specific internal
* format. * format.
* *
* @param array ref $root * @param array $root (by reference)
* @param string $path * @param string $path
* @param object $asn1 * @param object $asn1
* @access private * @access private
@ -1691,7 +1691,7 @@ class File_X509
* Map extension values from extension-specific internal format to * Map extension values from extension-specific internal format to
* octet string. * octet string.
* *
* @param array ref $root * @param array $root (by reference)
* @param string $path * @param string $path
* @param object $asn1 * @param object $asn1
* @access private * @access private
@ -1757,7 +1757,7 @@ class File_X509
* Map attribute values from ANY type to attribute-specific internal * Map attribute values from ANY type to attribute-specific internal
* format. * format.
* *
* @param array ref $root * @param array $root (by reference)
* @param string $path * @param string $path
* @param object $asn1 * @param object $asn1
* @access private * @access private
@ -1798,7 +1798,7 @@ class File_X509
* Map attribute values from attribute-specific internal format to * Map attribute values from attribute-specific internal format to
* ANY type. * ANY type.
* *
* @param array ref $root * @param array $root (by reference)
* @param string $path * @param string $path
* @param object $asn1 * @param object $asn1
* @access private * @access private
@ -1841,7 +1841,7 @@ class File_X509
* Map DN values from ANY type to DN-specific internal * Map DN values from ANY type to DN-specific internal
* format. * format.
* *
* @param array ref $root * @param array $root (by reference)
* @param string $path * @param string $path
* @param object $asn1 * @param object $asn1
* @access private * @access private
@ -1871,7 +1871,7 @@ class File_X509
* Map DN values from DN-specific internal format to * Map DN values from DN-specific internal format to
* ANY type. * ANY type.
* *
* @param array ref $root * @param array $root (by reference)
* @param string $path * @param string $path
* @param object $asn1 * @param object $asn1
* @access private * @access private
@ -3243,7 +3243,8 @@ class File_X509
/** /**
* Load a Certificate Signing Request * Load a Certificate Signing Request
* *
* @param string $csr * @param string|array $csr
* @param int $mode
* @access public * @access public
* @return mixed * @return mixed
*/ */
@ -3383,7 +3384,7 @@ class File_X509
* *
* https://developer.mozilla.org/en-US/docs/HTML/Element/keygen * https://developer.mozilla.org/en-US/docs/HTML/Element/keygen
* *
* @param string $csr * @param string|array $spkac
* @access public * @access public
* @return mixed * @return mixed
*/ */
@ -3457,7 +3458,7 @@ class File_X509
/** /**
* Save a SPKAC CSR request * Save a SPKAC CSR request
* *
* @param array $csr * @param string|array $spkac
* @param int $format optional * @param int $format optional
* @access public * @access public
* @return string * @return string
@ -3501,6 +3502,7 @@ class File_X509
* Load a Certificate Revocation List * Load a Certificate Revocation List
* *
* @param string $crl * @param string $crl
* @param int $mode
* @access public * @access public
* @return mixed * @return mixed
*/ */
@ -4114,7 +4116,6 @@ class File_X509
* X.509 certificate signing helper function. * X.509 certificate signing helper function.
* *
* @param object $key * @param object $key
* @param File_X509 $subject
* @param string $signatureAlgorithm * @param string $signatureAlgorithm
* @access public * @access public
* @return mixed * @return mixed
@ -4192,7 +4193,7 @@ class File_X509
* Set Serial Number * Set Serial Number
* *
* @param string $serial * @param string $serial
* @param $base optional * @param int $base optional
* @access public * @access public
*/ */
function setSerialNumber($serial, $base = -256) 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 * Set the IP Addresses's which the cert is to be valid for
* *
* @access public * @access public
* @param string $ipAddress optional
*/ */
function setIPAddress() function setIPAddress()
{ {

View File

@ -237,7 +237,7 @@ class Math_BigInteger
* ?> * ?>
* </code> * </code>
* *
* @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 * @param int $base
* @return Math_BigInteger * @return Math_BigInteger
* @access public * @access public
@ -2021,7 +2021,7 @@ class Math_BigInteger
* *
* @see self::_slidingWindow() * @see self::_slidingWindow()
* @access private * @access private
* @param Math_BigInteger * @param Math_BigInteger $n
* @return Math_BigInteger * @return Math_BigInteger
*/ */
function _mod2($n) 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. * 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 * @return Math_BigInteger
* @access private * @access private
*/ */
@ -3603,7 +3603,7 @@ class Math_BigInteger
* *
* Removes leading zeros and truncates (if necessary) to maintain the appropriate precision * Removes leading zeros and truncates (if necessary) to maintain the appropriate precision
* *
* @param Math_BigInteger * @param Math_BigInteger $result
* @return Math_BigInteger * @return Math_BigInteger
* @see self::_trim() * @see self::_trim()
* @access private * @access private
@ -3680,8 +3680,8 @@ class Math_BigInteger
/** /**
* Array Repeat * Array Repeat
* *
* @param $input Array * @param array $input
* @param $multiplier mixed * @param mixed $multiplier
* @return array * @return array
* @access private * @access private
*/ */
@ -3695,8 +3695,8 @@ class Math_BigInteger
* *
* Shifts binary strings $shift bits, essentially multiplying by 2**$shift. * Shifts binary strings $shift bits, essentially multiplying by 2**$shift.
* *
* @param $x String * @param string $x (by reference)
* @param $shift Integer * @param int $shift
* @return string * @return string
* @access private * @access private
*/ */
@ -3724,8 +3724,8 @@ class Math_BigInteger
* *
* Shifts binary strings $shift bits, essentially dividing by 2**$shift and returning the remainder. * Shifts binary strings $shift bits, essentially dividing by 2**$shift and returning the remainder.
* *
* @param $x String * @param string $x (by referenc)
* @param $shift Integer * @param int $shift
* @return string * @return string
* @access private * @access private
*/ */

View File

@ -471,7 +471,6 @@ class Net_SFTP extends Net_SSH2
* Login * Login
* *
* @param string $username * @param string $username
* @param string $password
* @return bool * @return bool
* @access public * @access public
*/ */
@ -1286,7 +1285,7 @@ class Net_SFTP extends Net_SSH2
* *
* Mainly used by file_exists * Mainly used by file_exists
* *
* @param string $dir * @param string $path
* @return mixed * @return mixed
* @access private * @access private
*/ */
@ -1841,6 +1840,8 @@ class Net_SFTP extends Net_SSH2
* Creates a directory. * Creates a directory.
* *
* @param string $dir * @param string $dir
* @param int $mode
* @param bool $recursive
* @return bool * @return bool
* @access public * @access public
*/ */
@ -1873,6 +1874,7 @@ class Net_SFTP extends Net_SSH2
* Helper function for directory creation * Helper function for directory creation
* *
* @param string $dir * @param string $dir
* @param int $mode
* @return bool * @return bool
* @access private * @access private
*/ */
@ -2796,6 +2798,7 @@ class Net_SFTP extends Net_SSH2
* *
* @param string $path * @param string $path
* @param string $prop * @param string $prop
* @param mixed $type
* @return mixed * @return mixed
* @access private * @access private
*/ */
@ -3036,6 +3039,7 @@ class Net_SFTP extends Net_SSH2
* *
* @param int $type * @param int $type
* @param string $data * @param string $data
* @param int $request_id
* @see self::_get_sftp_packet() * @see self::_get_sftp_packet()
* @see Net_SSH2::_send_channel_packet() * @see Net_SSH2::_send_channel_packet()
* @return bool * @return bool

View File

@ -644,7 +644,6 @@ class Net_SFTP_Stream
* $options. What does 8 correspond to? * $options. What does 8 correspond to?
* *
* @param string $path * @param string $path
* @param int $mode
* @param int $options * @param int $options
* @return bool * @return bool
* @access public * @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 * If NET_SFTP_STREAM_LOGGING is defined all calls will be output on the screen and then (regardless of whether or not
* NET_SFTP_STREAM_LOGGING is enabled) the parameters will be passed through to the appropriate method. * NET_SFTP_STREAM_LOGGING is enabled) the parameters will be passed through to the appropriate method.
* *
* @param string * @param string $name
* @param array * @param array $arguments
* @return mixed * @return mixed
* @access public * @access public
*/ */

View File

@ -857,6 +857,7 @@ class Net_SSH1
* @see self::interactiveRead() * @see self::interactiveRead()
* @see self::interactiveWrite() * @see self::interactiveWrite()
* @param string $cmd * @param string $cmd
* @param bool $block
* @return mixed * @return mixed
* @access public * @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. * named constants from it, using the value as the name of the constant and the index as the value of the constant.
* If any of the constants that would be defined already exists, none of the constants will be defined. * If any of the constants that would be defined already exists, none of the constants will be defined.
* *
* @param array $array
* @access private * @access private
*/ */
function _define_array() function _define_array()
@ -1633,7 +1633,8 @@ class Net_SSH1
* *
* Makes sure that only the last 1MB worth of packets will be logged * Makes sure that only the last 1MB worth of packets will be logged
* *
* @param string $data * @param int $protocol_flags
* @param string $message
* @access private * @access private
*/ */
function _append_log($protocol_flags, $message) function _append_log($protocol_flags, $message)

View File

@ -2122,8 +2122,6 @@ class Net_SSH2
* The $password parameter can be a plaintext password, a Crypt_RSA object or an array * The $password parameter can be a plaintext password, a Crypt_RSA object or an array
* *
* @param string $username * @param string $username
* @param mixed $password
* @param mixed $...
* @return bool * @return bool
* @see self::_login() * @see self::_login()
* @access public * @access public
@ -2150,8 +2148,6 @@ class Net_SSH2
* Login Helper * Login Helper
* *
* @param string $username * @param string $username
* @param mixed $password
* @param mixed $...
* @return bool * @return bool
* @see self::_login_helper() * @see self::_login_helper()
* @access private * @access private
@ -2416,7 +2412,6 @@ class Net_SSH2
/** /**
* Handle the keyboard-interactive requests / responses. * Handle the keyboard-interactive requests / responses.
* *
* @param string $responses...
* @return bool * @return bool
* @access private * @access private
*/ */
@ -2561,7 +2556,7 @@ class Net_SSH2
* Login with an RSA private key * Login with an RSA private key
* *
* @param string $username * @param string $username
* @param Crypt_RSA $password * @param Crypt_RSA $privatekey
* @return bool * @return bool
* @access private * @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} * @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. * Returns the data as a string if it's available and false if not.
* *
* @param $client_channel * @param int $client_channel
* @return mixed * @param bool $skip_extended
* @return mixed|bool
* @access private * @access private
*/ */
function _get_channel_packet($client_channel, $skip_extended = false) 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 * 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 * @access private
*/ */
function _append_log($message_number, $message) 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. * named constants from it, using the value as the name of the constant and the index as the value of the constant.
* If any of the constants that would be defined already exists, none of the constants will be defined. * If any of the constants that would be defined already exists, none of the constants will be defined.
* *
* @param array $array
* @access private * @access private
*/ */
function _define_array() function _define_array()