From 5711e7fbe41f959b746ba7c5f48020d2f4677521 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 12 Sep 2020 10:14:54 +0200 Subject: [PATCH] Fix phpdoc issues reported by Doctum --- phpseclib/Crypt/ChaCha20.php | 17 ++++++++++++++++- phpseclib/Crypt/Common/AsymmetricKey.php | 2 +- phpseclib/Crypt/Common/Formats/Keys/PKCS8.php | 1 + phpseclib/Crypt/DSA/Formats/Keys/OpenSSH.php | 2 +- phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php | 2 +- phpseclib/Crypt/DSA/Formats/Keys/PKCS8.php | 2 +- phpseclib/Crypt/Salsa20.php | 17 ++++++++++++++++- phpseclib/Math/BigInteger/Engines/Engine.php | 1 + 8 files changed, 38 insertions(+), 6 deletions(-) diff --git a/phpseclib/Crypt/ChaCha20.php b/phpseclib/Crypt/ChaCha20.php index 91aae45c..0bf1c2eb 100644 --- a/phpseclib/Crypt/ChaCha20.php +++ b/phpseclib/Crypt/ChaCha20.php @@ -289,7 +289,22 @@ class ChaCha20 extends Salsa20 /** * The doubleround function * - * @param int $x0...$x16 + * @param int $x0 (by reference) + * @param int $x1 (by reference) + * @param int $x2 (by reference) + * @param int $x3 (by reference) + * @param int $x4 (by reference) + * @param int $x5 (by reference) + * @param int $x6 (by reference) + * @param int $x7 (by reference) + * @param int $x8 (by reference) + * @param int $x9 (by reference) + * @param int $x10 (by reference) + * @param int $x11 (by reference) + * @param int $x12 (by reference) + * @param int $x13 (by reference) + * @param int $x14 (by reference) + * @param int $x15 (by reference) */ protected static function doubleRound(&$x0, &$x1, &$x2, &$x3, &$x4, &$x5, &$x6, &$x7, &$x8, &$x9, &$x10, &$x11, &$x12, &$x13, &$x14, &$x15) { diff --git a/phpseclib/Crypt/Common/AsymmetricKey.php b/phpseclib/Crypt/Common/AsymmetricKey.php index 6971d0dc..9c368ebb 100644 --- a/phpseclib/Crypt/Common/AsymmetricKey.php +++ b/phpseclib/Crypt/Common/AsymmetricKey.php @@ -183,8 +183,8 @@ abstract class AsymmetricKey /** * Load the key, assuming a specific format * - * @param string $key * @param string $type + * @param string $key * @param string $password optional * @return AsymmetricKey */ diff --git a/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php b/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php index d411199c..5c82e678 100644 --- a/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php +++ b/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php @@ -617,6 +617,7 @@ abstract class PKCS8 extends PKCS * @access public * @param string $key * @param mixed $params + * @param string $oid * @return string */ protected static function wrapPublicKey($key, $params, $oid = null) diff --git a/phpseclib/Crypt/DSA/Formats/Keys/OpenSSH.php b/phpseclib/Crypt/DSA/Formats/Keys/OpenSSH.php index b160e581..bf2d9860 100644 --- a/phpseclib/Crypt/DSA/Formats/Keys/OpenSSH.php +++ b/phpseclib/Crypt/DSA/Formats/Keys/OpenSSH.php @@ -110,8 +110,8 @@ abstract class OpenSSH extends Progenitor * @param \phpseclib3\Math\BigInteger $p * @param \phpseclib3\Math\BigInteger $q * @param \phpseclib3\Math\BigInteger $g - * @param \phpseclib3\Math\BigInteger $x * @param \phpseclib3\Math\BigInteger $y + * @param \phpseclib3\Math\BigInteger $x * @param string $password optional * @param array $options optional * @return string diff --git a/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php b/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php index 83370bfc..75748737 100644 --- a/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php +++ b/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php @@ -110,8 +110,8 @@ abstract class PKCS1 extends Progenitor * @param \phpseclib3\Math\BigInteger $p * @param \phpseclib3\Math\BigInteger $q * @param \phpseclib3\Math\BigInteger $g - * @param \phpseclib3\Math\BigInteger $x * @param \phpseclib3\Math\BigInteger $y + * @param \phpseclib3\Math\BigInteger $x * @param string $password optional * @param array $options optional * @return string diff --git a/phpseclib/Crypt/DSA/Formats/Keys/PKCS8.php b/phpseclib/Crypt/DSA/Formats/Keys/PKCS8.php index e56f455f..71f66eb0 100644 --- a/phpseclib/Crypt/DSA/Formats/Keys/PKCS8.php +++ b/phpseclib/Crypt/DSA/Formats/Keys/PKCS8.php @@ -125,8 +125,8 @@ abstract class PKCS8 extends Progenitor * @param \phpseclib3\Math\BigInteger $p * @param \phpseclib3\Math\BigInteger $q * @param \phpseclib3\Math\BigInteger $g - * @param \phpseclib3\Math\BigInteger $x * @param \phpseclib3\Math\BigInteger $y + * @param \phpseclib3\Math\BigInteger $x * @param string $password optional * @param array $options optional * @return string diff --git a/phpseclib/Crypt/Salsa20.php b/phpseclib/Crypt/Salsa20.php index e4e98e90..c2555639 100644 --- a/phpseclib/Crypt/Salsa20.php +++ b/phpseclib/Crypt/Salsa20.php @@ -434,7 +434,22 @@ class Salsa20 extends StreamCipher /** * The doubleround function * - * @param int $x0...$x16 + * @param int $x0 (by reference) + * @param int $x1 (by reference) + * @param int $x2 (by reference) + * @param int $x3 (by reference) + * @param int $x4 (by reference) + * @param int $x5 (by reference) + * @param int $x6 (by reference) + * @param int $x7 (by reference) + * @param int $x8 (by reference) + * @param int $x9 (by reference) + * @param int $x10 (by reference) + * @param int $x11 (by reference) + * @param int $x12 (by reference) + * @param int $x13 (by reference) + * @param int $x14 (by reference) + * @param int $x15 (by reference) */ protected static function doubleRound(&$x0, &$x1, &$x2, &$x3, &$x4, &$x5, &$x6, &$x7, &$x8, &$x9, &$x10, &$x11, &$x12, &$x13, &$x14, &$x15) { diff --git a/phpseclib/Math/BigInteger/Engines/Engine.php b/phpseclib/Math/BigInteger/Engines/Engine.php index e95603ab..097dc1a0 100644 --- a/phpseclib/Math/BigInteger/Engines/Engine.php +++ b/phpseclib/Math/BigInteger/Engines/Engine.php @@ -1092,6 +1092,7 @@ abstract class Engine implements \Serializable * Calculates the greatest common divisor and Bezout's identity. * * @param Engine $n + * @param Engine $stop (optional) * @return Engine */ protected function extendedGCDHelper(Engine $n, Engine $stop = null)