1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-11-26 20:35:21 +01:00

More PHPDOC fixes

This commit is contained in:
Sokolovskyy Roman 2017-08-04 12:06:25 +02:00
parent eb21fb2bcb
commit 55cacdf7cd
14 changed files with 43 additions and 32 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
/vendor
/composer.phar
/.idea/
.gitignore

View File

@ -572,7 +572,7 @@ class X509
* Map extension values from octet string to extension-specific internal
* format.
*
* @param array ref $root
* @param &array $root
* @param string $path
* @access private
*/
@ -618,7 +618,7 @@ class X509
* Map extension values from extension-specific internal format to
* octet string.
*
* @param array ref $root
* @param &array Ref $root
* @param string $path
* @access private
*/
@ -682,7 +682,7 @@ class X509
* Map attribute values from ANY type to attribute-specific internal
* format.
*
* @param array ref $root
* @param &array Ref $root
* @param string $path
* @access private
*/
@ -722,7 +722,7 @@ class X509
* Map attribute values from attribute-specific internal format to
* ANY type.
*
* @param array ref $root
* @param &array $root Ref
* @param string $path
* @access private
*/
@ -764,7 +764,7 @@ class X509
* Map DN values from ANY type to DN-specific internal
* format.
*
* @param array ref $root
* @param &array $root
* @param string $path
* @access private
*/
@ -793,7 +793,7 @@ class X509
* Map DN values from DN-specific internal format to
* ANY type.
*
* @param array ref $root
* @param &array $root
* @param string $path
* @access private
*/
@ -1053,6 +1053,7 @@ class X509
*
* @param int $date optional
* @access public
* @return boolean
*/
public function validateDate($date = null)
{
@ -2051,7 +2052,7 @@ class X509
*
* https://developer.mozilla.org/en-US/docs/HTML/Element/keygen
*
* @param string $csr
* @param string $spkac
* @access public
* @return mixed
*/
@ -2119,7 +2120,7 @@ class X509
/**
* Save a SPKAC CSR request
*
* @param array $csr
* @param array $spkac
* @param int $format optional
* @access public
* @return string
@ -2808,7 +2809,7 @@ class X509
* Set Serial Number
*
* @param string $serial
* @param $base optional
* @param $base integer Optional
* @access public
*/
public function setSerialNumber($serial, $base = -256)

View File

@ -120,7 +120,7 @@ class BigInteger implements \Serializable
* If the second parameter - $base - is negative, then it will be assumed that the number's are encoded using
* two's compliment. The sole exception to this is -10, which is treated the same as 10 is.
*
* @param $x base-10 number or base-$base number if $base set.
* @param $x integer|BigInteger\Engines\Engine Base-10 number or base-$base number if $base set.
* @param int $base
* @return \phpseclib\Math\BigInteger
*/

View File

@ -100,7 +100,7 @@ class BCMath extends Engine
/**
* Default constructor
*
* @param $x base-10 number or base-$base number if $base set.
* @param $x integer Base-10 number or base-$base number if $base set.
* @param int $base
* @see parent::__construct()
* @return \phpseclib\Math\BigInteger\Engines\BCMath
@ -549,7 +549,7 @@ class BCMath extends Engine
* BigInteger::randomRange($min, $max)
* BigInteger::randomRange($max, $min)
*
* @return \phpseclib\Math\BigInteger\Engines\Engine\BCMath
* @return \phpseclib\Math\BigInteger\Engines\BCMath
*/
public static function randomRange(BCMath $min, BCMath $max)
{

View File

@ -59,7 +59,7 @@ abstract class Engine implements \Serializable
/**
* Default constructor
*
* @param $x base-10 number or base-$base number if $base set.
* @param $x integer Base-10 number or base-$base number if $base set.
* @param int $base
* @return \phpseclib\Math\BigInteger\Engines\Engine
*/

View File

@ -102,7 +102,7 @@ class GMP extends Engine
/**
* Default constructor
*
* @param $x base-10 number or base-$base number if $base set.
* @param $x integer Base-10 number or base-$base number if $base set.
* @param int $base
* @see parent::__construct()
* @return \phpseclib\Math\BigInteger\Engines\GMP
@ -511,7 +511,7 @@ class GMP extends Engine
* BigInteger::randomRange($min, $max)
* BigInteger::randomRange($max, $min)
*
* @return \phpseclib\Math\BigInteger\Engines\Engine\GMP
* @return \phpseclib\Math\BigInteger\Engines\GMP
*/
public static function randomRange(GMP $min, GMP $max)
{

View File

@ -74,7 +74,7 @@ abstract class PHP extends Engine
/**
* Default constructor
*
* @param $x base-10 number or base-$base number if $base set.
* @param $x integer Base-10 number or base-$base number if $base set.
* @param int $base
* @see parent::__construct()
* @return \phpseclib\Math\BigInteger\Engines\PHP
@ -524,7 +524,7 @@ abstract class PHP extends Engine
* same. If the remainder would be negative, the "common residue" is equal to the sum of the remainder
* and the divisor (basically, the "common residue" is the first positive modulo).
*
* @param \phpseclib\Math\BigInteger\PHP $y
* @param \phpseclib\Math\BigInteger\engines\PHP $y
* @return array
* @internal This function is based off of {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=9 HAC 14.20}.
*/

View File

@ -42,11 +42,11 @@ abstract class Montgomery extends Base
/**
* Performs modular exponentiation.
*
* @param \phpseclib\Math\BigInteger\Engine $x
* @param \phpseclib\Math\BigInteger\Engine $e
* @param \phpseclib\Math\BigInteger\Engine $n
* @param \phpseclib\Math\BigInteger\Engines\Engine $x
* @param \phpseclib\Math\BigInteger\Engines\Engine $e
* @param \phpseclib\Math\BigInteger\Engines\Engine $n
* @param string $class
* @return \phpseclib\Math\BigInteger\Engine|Engine
* @return \phpseclib\Math\BigInteger\Engines\Engine
*/
protected static function slidingWindow(Engine $x, Engine $e, Engine $n, $class)
{

View File

@ -294,7 +294,7 @@ class PHP32 extends PHP
* BigInteger::randomRange($min, $max)
* BigInteger::randomRange($max, $min)
*
* @return \phpseclib\Math\BigInteger\Engines\Engine\PHP32
* @return \phpseclib\Math\BigInteger\Engines\PHP32
*/
public static function randomRange(PHP32 $min, PHP32 $max)
{

View File

@ -294,7 +294,7 @@ class PHP64 extends PHP
* BigInteger::randomRange($min, $max)
* BigInteger::randomRange($max, $min)
*
* @return \phpseclib\Math\BigInteger\Engines\Engine\PHP64
* @return \phpseclib\Math\BigInteger\Engines\PHP64
*/
public static function randomRange(PHP64 $min, PHP64 $max)
{

View File

@ -3084,7 +3084,7 @@ class SFTP extends SSH2
*
* @param int $reason
* @return bool
* @access private
* @access protected
*/
protected function disconnect_helper($reason)
{

View File

@ -868,7 +868,7 @@ class SSH2
/**
* A System_SSH_Agent for use in the SSH2 Agent Forwarding scenario
*
* @var System_SSH_Agent
* @var \phpseclib\System\Ssh\Agent
* @access private
*/
private $agent;
@ -3827,7 +3827,7 @@ class SSH2
*
* @param int $reason
* @return bool
* @access private
* @access protected
*/
protected function disconnect_helper($reason)
{
@ -3848,7 +3848,7 @@ class SSH2
* If any of the constants that would be defined already exists, none of the constants will be defined.
*
* @param array $array
* @access private
* @access protected
*/
protected function define_array()
{

View File

@ -219,7 +219,7 @@ class Agent
* Signal that agent forwarding should
* be requested when a channel is opened
*
* @param Net_SSH2 $ssh
* @param \phpseclib\Net\SSH2 $ssh
* @return bool
* @access public
*/
@ -233,7 +233,7 @@ class Agent
/**
* Request agent forwarding of remote server
*
* @param Net_SSH2 $ssh
* @param \phpseclib\Net\SSH2 $ssh
* @return bool
* @access private
*/
@ -276,7 +276,7 @@ class Agent
* open to give the SSH Agent an opportunity
* to take further action. i.e. request agent forwarding
*
* @param Net_SSH2 $ssh
* @param \phpseclib\Net\SSH2 $ssh
* @access private
*/
private function on_channel_open($ssh)
@ -290,7 +290,7 @@ class Agent
* Forward data to SSH Agent and return data reply
*
* @param string $data
* @return data from SSH Agent
* @return string Data from SSH Agent
* @throws \RuntimeException on connection errors
* @access private
*/

View File

@ -77,7 +77,15 @@ class Unit_Crypt_BlowfishTest extends PhpseclibTestCase
$bf = new Blowfish('cbc');
$bf->setKey($key);
$bf->setIV(str_repeat("\0", $bf->getBlockLength() >> 3));
if (!$bf->isValidEngine($engine)) {
$engines = array(
'PHP'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_INTERNAL,
'Eval'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_EVAL,
'mcrypt'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_MCRYPT,
'OpenSSL'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_OPENSSL,
);
if (!$bf->isValidEngine($engines[$engine])) {
self::markTestSkipped("Unable to initialize $engine engine");
}
$bf->setPreferredEngine($engine);