mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-11 08:39:43 +01:00
Merge branch '2.0' into 3.0
This commit is contained in:
commit
480af6b980
@ -77,7 +77,7 @@ abstract class Strings
|
|||||||
* uint64 is not supported.
|
* uint64 is not supported.
|
||||||
*
|
*
|
||||||
* @param string $format
|
* @param string $format
|
||||||
* @param $data
|
* @param string $data
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public static function unpackSSH2($format, &$data)
|
public static function unpackSSH2($format, &$data)
|
||||||
@ -138,7 +138,7 @@ abstract class Strings
|
|||||||
/**
|
/**
|
||||||
* Create SSH2-style string
|
* Create SSH2-style string
|
||||||
*
|
*
|
||||||
* @param $elements[]
|
* @param string[] ...$elements
|
||||||
* @access public
|
* @access public
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@ -239,7 +239,7 @@ abstract class AsymmetricKey
|
|||||||
* Load Plugins
|
* Load Plugins
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param $format
|
* @param string $format
|
||||||
*/
|
*/
|
||||||
private static function loadPlugins($format)
|
private static function loadPlugins($format)
|
||||||
{
|
{
|
||||||
@ -325,7 +325,6 @@ abstract class AsymmetricKey
|
|||||||
* Tests engine validity
|
* Tests engine validity
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param int $val
|
|
||||||
*/
|
*/
|
||||||
public static function useBestEngine()
|
public static function useBestEngine()
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ abstract class OpenSSH
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param string $type
|
* @param string $password
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function load($key, $password = '')
|
public static function load($key, $password = '')
|
||||||
|
@ -42,7 +42,7 @@ abstract class PKCS
|
|||||||
* Is the key a base-64 encoded PEM, DER or should it be auto-detected?
|
* Is the key a base-64 encoded PEM, DER or should it be auto-detected?
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected static $format = self::MODE_ANY;
|
protected static $format = self::MODE_ANY;
|
||||||
|
|
||||||
|
@ -882,7 +882,7 @@ abstract class SymmetricKey
|
|||||||
* @see Crypt/Hash.php
|
* @see Crypt/Hash.php
|
||||||
* @param string $password
|
* @param string $password
|
||||||
* @param string $method
|
* @param string $method
|
||||||
* @param $func_args[]
|
* @param string[] ...$func_args
|
||||||
* @throws \LengthException if pbkdf1 is being used and the derived key length exceeds the hash length
|
* @throws \LengthException if pbkdf1 is being used and the derived key length exceeds the hash length
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access public
|
* @access public
|
||||||
|
@ -388,7 +388,6 @@ abstract class DH extends AsymmetricKey
|
|||||||
*
|
*
|
||||||
* @see self::getPublicKey()
|
* @see self::getPublicKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $type optional
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getParameters()
|
public function getParameters()
|
||||||
|
@ -185,7 +185,7 @@ abstract class DSA extends AsymmetricKey
|
|||||||
*
|
*
|
||||||
* Returns the private key, from which the publickey can be extracted
|
* Returns the private key, from which the publickey can be extracted
|
||||||
*
|
*
|
||||||
* @param $args[]
|
* @param int[] ...$args
|
||||||
* @access public
|
* @access public
|
||||||
* @return DSA\PrivateKey
|
* @return DSA\PrivateKey
|
||||||
*/
|
*/
|
||||||
@ -304,7 +304,6 @@ abstract class DSA extends AsymmetricKey
|
|||||||
*
|
*
|
||||||
* @see self::getPublicKey()
|
* @see self::getPublicKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $type optional
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getParameters()
|
public function getParameters()
|
||||||
@ -323,7 +322,7 @@ abstract class DSA extends AsymmetricKey
|
|||||||
* Valid values are: ASN1, SSH2, Raw
|
* Valid values are: ASN1, SSH2, Raw
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $padding
|
* @param string $format
|
||||||
*/
|
*/
|
||||||
public function withSignatureFormat($format)
|
public function withSignatureFormat($format)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,6 @@ class PrivateKey extends DSA implements Common\PrivateKey
|
|||||||
*
|
*
|
||||||
* @see self::getPrivateKey()
|
* @see self::getPrivateKey()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $type optional
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getPublicKey()
|
public function getPublicKey()
|
||||||
|
@ -35,7 +35,6 @@ class PublicKey extends DSA implements Common\PublicKey
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param string $signature
|
* @param string $signature
|
||||||
* @param string $format optional
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function verify($message, $signature)
|
public function verify($message, $signature)
|
||||||
|
@ -373,7 +373,7 @@ abstract class EC extends AsymmetricKey
|
|||||||
* Valid values are: ASN1, SSH2, Raw
|
* Valid values are: ASN1, SSH2, Raw
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $padding
|
* @param string $format
|
||||||
*/
|
*/
|
||||||
public function withSignatureFormat($format)
|
public function withSignatureFormat($format)
|
||||||
{
|
{
|
||||||
|
@ -252,7 +252,8 @@ class KoblitzPrime extends Prime
|
|||||||
* Calculates the parameters needed from the Euclidean algorithm as discussed at
|
* Calculates the parameters needed from the Euclidean algorithm as discussed at
|
||||||
* http://diamond.boisestate.edu/~liljanab/MATH308/GuideToECC.pdf#page=148
|
* http://diamond.boisestate.edu/~liljanab/MATH308/GuideToECC.pdf#page=148
|
||||||
*
|
*
|
||||||
* @param BigInteger $n
|
* @param BigInteger $u
|
||||||
|
* @param BigInteger $v
|
||||||
* @return BigInteger[]
|
* @return BigInteger[]
|
||||||
*/
|
*/
|
||||||
protected static function extendedGCD(BigInteger $u, BigInteger $v)
|
protected static function extendedGCD(BigInteger $u, BigInteger $v)
|
||||||
|
@ -102,7 +102,7 @@ class Ed25519 extends TwistedEdwards
|
|||||||
*
|
*
|
||||||
* Used by EC\Keys\Common.php
|
* Used by EC\Keys\Common.php
|
||||||
*
|
*
|
||||||
* @param BigInteger $x
|
* @param BigInteger $y
|
||||||
* @param boolean $sign
|
* @param boolean $sign
|
||||||
* @return object[]
|
* @return object[]
|
||||||
*/
|
*/
|
||||||
@ -189,7 +189,7 @@ class Ed25519 extends TwistedEdwards
|
|||||||
/**
|
/**
|
||||||
* Encode a point as a string
|
* Encode a point as a string
|
||||||
*
|
*
|
||||||
* @param string $str
|
* @param array $point
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function encodePoint($point)
|
public function encodePoint($point)
|
||||||
|
@ -54,7 +54,7 @@ class Ed448 extends TwistedEdwards
|
|||||||
*
|
*
|
||||||
* Used by EC\Keys\Common.php
|
* Used by EC\Keys\Common.php
|
||||||
*
|
*
|
||||||
* @param BigInteger $x
|
* @param BigInteger $y
|
||||||
* @param boolean $sign
|
* @param boolean $sign
|
||||||
* @return object[]
|
* @return object[]
|
||||||
*/
|
*/
|
||||||
@ -127,7 +127,7 @@ class Ed448 extends TwistedEdwards
|
|||||||
/**
|
/**
|
||||||
* Encode a point as a string
|
* Encode a point as a string
|
||||||
*
|
*
|
||||||
* @param string $str
|
* @param array $point
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function encodePoint($point)
|
public function encodePoint($point)
|
||||||
|
@ -78,7 +78,7 @@ abstract class MontgomeryPrivate
|
|||||||
* Convert an EC public key to the appropriate format
|
* Convert an EC public key to the appropriate format
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param \phpseclib3\Crypt\EC\Curves\MontgomeryCurve $curve
|
* @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve
|
||||||
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
|
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -92,7 +92,7 @@ abstract class MontgomeryPrivate
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param \phpseclib3\Math\Common\FiniteField\Integer $privateKey
|
* @param \phpseclib3\Math\Common\FiniteField\Integer $privateKey
|
||||||
* @param \phpseclib3\Crypt\EC\Curves\Montgomery $curve
|
* @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve
|
||||||
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
|
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
|
||||||
* @param string $password optional
|
* @param string $password optional
|
||||||
* @return string
|
* @return string
|
||||||
|
@ -68,7 +68,7 @@ abstract class MontgomeryPublic
|
|||||||
* Convert an EC public key to the appropriate format
|
* Convert an EC public key to the appropriate format
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param \phpseclib3\Crypt\EC\Curves\Montgomery $curve
|
* @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve
|
||||||
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
|
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -175,7 +175,7 @@ abstract class PKCS8 extends Progenitor
|
|||||||
* @access public
|
* @access public
|
||||||
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
|
* @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve
|
||||||
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
|
* @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
|
||||||
* @param array $optiona optional
|
* @param array $options optional
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = [])
|
public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = [])
|
||||||
|
@ -35,7 +35,7 @@ abstract class ASN1
|
|||||||
* Loads a signature
|
* Loads a signature
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $key
|
* @param string $sig
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function load($sig)
|
public static function load($sig)
|
||||||
|
@ -734,7 +734,7 @@ abstract class RSA extends AsymmetricKey
|
|||||||
* Example: $key->withPadding(RSA::ENCRYPTION_PKCS1 | RSA::SIGNATURE_PKCS1);
|
* Example: $key->withPadding(RSA::ENCRYPTION_PKCS1 | RSA::SIGNATURE_PKCS1);
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $label
|
* @param int $padding
|
||||||
*/
|
*/
|
||||||
public function withPadding($padding)
|
public function withPadding($padding)
|
||||||
{
|
{
|
||||||
|
@ -461,7 +461,6 @@ class PrivateKey extends RSA implements Common\PrivateKey
|
|||||||
* @see self::encrypt()
|
* @see self::encrypt()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $ciphertext
|
* @param string $ciphertext
|
||||||
* @param int $padding optional
|
|
||||||
* @return bool|string
|
* @return bool|string
|
||||||
*/
|
*/
|
||||||
public function decrypt($ciphertext)
|
public function decrypt($ciphertext)
|
||||||
@ -481,7 +480,6 @@ class PrivateKey extends RSA implements Common\PrivateKey
|
|||||||
* Returns the public key
|
* Returns the public key
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $type optional
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getPublicKey()
|
public function getPublicKey()
|
||||||
|
@ -475,7 +475,7 @@ class Salsa20 extends StreamCipher
|
|||||||
* @see self::decrypt()
|
* @see self::decrypt()
|
||||||
* @see self::encrypt()
|
* @see self::encrypt()
|
||||||
* @access private
|
* @access private
|
||||||
* @param string $text
|
* @param string $ciphertext
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function poly1305($ciphertext)
|
protected function poly1305($ciphertext)
|
||||||
|
@ -1198,7 +1198,7 @@ abstract class ASN1
|
|||||||
* Called by _encode_der()
|
* Called by _encode_der()
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $content
|
* @param string $source
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function encodeOID($source)
|
public static function encodeOID($source)
|
||||||
|
@ -559,7 +559,7 @@ class 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 $root
|
* @param array $root (by reference)
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -608,7 +608,7 @@ class 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
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -672,7 +672,7 @@ class 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
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -712,7 +712,7 @@ class 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 $root Ref
|
* @param array $root (by reference)
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -754,7 +754,7 @@ class 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 $root
|
* @param array $root (by reference)
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -783,7 +783,7 @@ class 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 $root
|
* @param array $root (by reference)
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -2051,7 +2051,7 @@ class X509
|
|||||||
*
|
*
|
||||||
* Key needs to be a \phpseclib3\Crypt\RSA object
|
* Key needs to be a \phpseclib3\Crypt\RSA object
|
||||||
*
|
*
|
||||||
* @param object $key
|
* @param PublicKey $key
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@ -2065,7 +2065,7 @@ class X509
|
|||||||
*
|
*
|
||||||
* Key needs to be a \phpseclib3\Crypt\RSA object
|
* Key needs to be a \phpseclib3\Crypt\RSA object
|
||||||
*
|
*
|
||||||
* @param object $key
|
* @param PrivateKey $key
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public function setPrivateKey(PrivateKey $key)
|
public function setPrivateKey(PrivateKey $key)
|
||||||
@ -2513,7 +2513,6 @@ class X509
|
|||||||
*
|
*
|
||||||
* @param \phpseclib3\File\X509 $issuer
|
* @param \phpseclib3\File\X509 $issuer
|
||||||
* @param \phpseclib3\File\X509 $subject
|
* @param \phpseclib3\File\X509 $subject
|
||||||
* @param string $signatureAlgorithm optional
|
|
||||||
* @access public
|
* @access public
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
@ -2708,7 +2707,6 @@ class X509
|
|||||||
* Sign a CSR
|
* Sign a CSR
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $signatureAlgorithm
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function signCSR()
|
public function signCSR()
|
||||||
@ -2764,7 +2762,6 @@ class X509
|
|||||||
* Sign a SPKAC
|
* Sign a SPKAC
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $signatureAlgorithm
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function signSPKAC()
|
public function signSPKAC()
|
||||||
@ -2829,7 +2826,6 @@ class X509
|
|||||||
*
|
*
|
||||||
* @param \phpseclib3\File\X509 $issuer
|
* @param \phpseclib3\File\X509 $issuer
|
||||||
* @param \phpseclib3\File\X509 $crl
|
* @param \phpseclib3\File\X509 $crl
|
||||||
* @param string $signatureAlgorithm optional
|
|
||||||
* @access public
|
* @access public
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
@ -2960,7 +2956,7 @@ class X509
|
|||||||
/**
|
/**
|
||||||
* Identify signature algorithm from key settings
|
* Identify signature algorithm from key settings
|
||||||
*
|
*
|
||||||
* @param object $key
|
* @param PrivateKey $key
|
||||||
* @access private
|
* @access private
|
||||||
* @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported
|
* @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported
|
||||||
* @return string
|
* @return string
|
||||||
@ -3061,7 +3057,7 @@ class X509
|
|||||||
* Set Serial Number
|
* Set Serial Number
|
||||||
*
|
*
|
||||||
* @param string $serial
|
* @param string $serial
|
||||||
* @param $base integer Optional
|
* @param int $base optional
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public function setSerialNumber($serial, $base = -256)
|
public function setSerialNumber($serial, $base = -256)
|
||||||
@ -3711,7 +3707,7 @@ class X509
|
|||||||
/**
|
/**
|
||||||
* Set the domain name's which the cert is to be valid for
|
* Set the domain name's which the cert is to be valid for
|
||||||
*
|
*
|
||||||
* @param $domains[]
|
* @param mixed[] ...$domains
|
||||||
* @access public
|
* @access public
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@ -3726,7 +3722,7 @@ class 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 $ipAddresses[] optional
|
* @param mixed[] ...$ipAddresses
|
||||||
*/
|
*/
|
||||||
public function setIPAddress(...$ipAddresses)
|
public function setIPAddress(...$ipAddresses)
|
||||||
{
|
{
|
||||||
|
@ -153,7 +153,7 @@ class BigInteger implements \Serializable
|
|||||||
* If the second parameter - $base - is negative, then it will be assumed that the number's are encoded using
|
* 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.
|
* two's compliment. The sole exception to this is -10, which is treated the same as 10 is.
|
||||||
*
|
*
|
||||||
* @param $x integer|BigInteger\Engines\Engine Base-10 number or base-$base number if $base set.
|
* @param int|BigInteger\Engines\Engine $x Base-10 number or base-$base number if $base set.
|
||||||
* @param int $base
|
* @param int $base
|
||||||
* @return BigInteger
|
* @return BigInteger
|
||||||
*/
|
*/
|
||||||
@ -463,7 +463,7 @@ class BigInteger implements \Serializable
|
|||||||
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
||||||
*
|
*
|
||||||
* @param BigInteger $y
|
* @param BigInteger $y
|
||||||
* @return int < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
* @return int in case < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
||||||
* @access public
|
* @access public
|
||||||
* @see self::equals()
|
* @see self::equals()
|
||||||
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
||||||
@ -730,7 +730,7 @@ class BigInteger implements \Serializable
|
|||||||
/**
|
/**
|
||||||
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param BigInteger[] $nums
|
* @param BigInteger ...$nums
|
||||||
* @return BigInteger
|
* @return BigInteger
|
||||||
*/
|
*/
|
||||||
public static function min(BigInteger ...$nums)
|
public static function min(BigInteger ...$nums)
|
||||||
@ -743,7 +743,7 @@ class BigInteger implements \Serializable
|
|||||||
/**
|
/**
|
||||||
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param BigInteger[] $nums
|
* @param BigInteger ...$nums
|
||||||
* @return BigInteger
|
* @return BigInteger
|
||||||
*/
|
*/
|
||||||
public static function max(BigInteger ...$nums)
|
public static function max(BigInteger ...$nums)
|
||||||
|
@ -438,7 +438,7 @@ class BCMath extends Engine
|
|||||||
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
||||||
*
|
*
|
||||||
* @param BCMath $y
|
* @param BCMath $y
|
||||||
* @return int < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
* @return int in case < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
||||||
* @see self::equals()
|
* @see self::equals()
|
||||||
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
||||||
*/
|
*/
|
||||||
@ -639,7 +639,7 @@ class BCMath extends Engine
|
|||||||
/**
|
/**
|
||||||
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param BCMath[] $nums
|
* @param BCMath ...$nums
|
||||||
* @return BCMath
|
* @return BCMath
|
||||||
*/
|
*/
|
||||||
public static function min(BCMath ...$nums)
|
public static function min(BCMath ...$nums)
|
||||||
@ -650,7 +650,7 @@ class BCMath extends Engine
|
|||||||
/**
|
/**
|
||||||
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param BCMath[] $nums
|
* @param BCMath ...$nums
|
||||||
* @return BCMath
|
* @return BCMath
|
||||||
*/
|
*/
|
||||||
public static function max(BCMath ...$nums)
|
public static function max(BCMath ...$nums)
|
||||||
|
@ -434,8 +434,8 @@ abstract class Engine implements \Serializable
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* @param $shift Integer
|
* @param int $shift
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected static function base256_lshift(&$x, $shift)
|
protected static function base256_lshift(&$x, $shift)
|
||||||
|
@ -289,7 +289,7 @@ class GMP extends Engine
|
|||||||
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
||||||
*
|
*
|
||||||
* @param GMP $y
|
* @param GMP $y
|
||||||
* @return int < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
* @return int in case < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
||||||
* @access public
|
* @access public
|
||||||
* @see self::equals()
|
* @see self::equals()
|
||||||
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
||||||
@ -640,7 +640,7 @@ class GMP extends Engine
|
|||||||
/**
|
/**
|
||||||
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param GMP[] $nums
|
* @param GMP ...$nums
|
||||||
* @return GMP
|
* @return GMP
|
||||||
*/
|
*/
|
||||||
public static function min(GMP ...$nums)
|
public static function min(GMP ...$nums)
|
||||||
@ -651,7 +651,7 @@ class GMP extends Engine
|
|||||||
/**
|
/**
|
||||||
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param GMP[] $nums
|
* @param GMP ...$nums
|
||||||
* @return GMP
|
* @return GMP
|
||||||
*/
|
*/
|
||||||
public static function max(GMP ...$nums)
|
public static function max(GMP ...$nums)
|
||||||
|
@ -291,7 +291,7 @@ class PHP32 extends PHP
|
|||||||
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
||||||
*
|
*
|
||||||
* @param PHP32 $y
|
* @param PHP32 $y
|
||||||
* @return int < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
* @return int in case < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
||||||
* @access public
|
* @access public
|
||||||
* @see self::equals()
|
* @see self::equals()
|
||||||
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
||||||
@ -386,7 +386,7 @@ class PHP32 extends PHP
|
|||||||
/**
|
/**
|
||||||
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param PHP32[] $nums
|
* @param PHP32 ...$nums
|
||||||
* @return PHP32
|
* @return PHP32
|
||||||
*/
|
*/
|
||||||
public static function min(PHP32 ...$nums)
|
public static function min(PHP32 ...$nums)
|
||||||
@ -397,7 +397,7 @@ class PHP32 extends PHP
|
|||||||
/**
|
/**
|
||||||
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param PHP32[] $nums
|
* @param PHP32 ...$nums
|
||||||
* @return PHP32
|
* @return PHP32
|
||||||
*/
|
*/
|
||||||
public static function max(PHP32 ...$nums)
|
public static function max(PHP32 ...$nums)
|
||||||
|
@ -295,7 +295,7 @@ class PHP64 extends PHP
|
|||||||
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
* Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).
|
||||||
*
|
*
|
||||||
* @param PHP64 $y
|
* @param PHP64 $y
|
||||||
* @return int < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
* @return int in case < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal.
|
||||||
* @access public
|
* @access public
|
||||||
* @see self::equals()
|
* @see self::equals()
|
||||||
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
* @internal Could return $this->subtract($x), but that's not as fast as what we do do.
|
||||||
@ -390,7 +390,7 @@ class PHP64 extends PHP
|
|||||||
/**
|
/**
|
||||||
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
* Return the minimum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param PHP64[] $nums
|
* @param PHP64 ...$nums
|
||||||
* @return PHP64
|
* @return PHP64
|
||||||
*/
|
*/
|
||||||
public static function min(PHP64 ...$nums)
|
public static function min(PHP64 ...$nums)
|
||||||
@ -401,7 +401,7 @@ class PHP64 extends PHP
|
|||||||
/**
|
/**
|
||||||
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
* Return the maximum BigInteger between an arbitrary number of BigIntegers.
|
||||||
*
|
*
|
||||||
* @param PHP64[] $nums
|
* @param PHP64 ...$nums
|
||||||
* @return PHP64
|
* @return PHP64
|
||||||
*/
|
*/
|
||||||
public static function max(PHP64 ...$nums)
|
public static function max(PHP64 ...$nums)
|
||||||
|
@ -420,7 +420,7 @@ class SFTP extends SSH2
|
|||||||
* Login
|
* Login
|
||||||
*
|
*
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @param $args[] string password
|
* @param string[] ...$args
|
||||||
* @throws \UnexpectedValueException on receipt of unexpected packets
|
* @throws \UnexpectedValueException on receipt of unexpected packets
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access public
|
* @access public
|
||||||
@ -1054,7 +1054,7 @@ class SFTP extends SSH2
|
|||||||
* $sftp->setListOrder();
|
* $sftp->setListOrder();
|
||||||
* Don't do any sort of sorting
|
* Don't do any sort of sorting
|
||||||
*
|
*
|
||||||
* @param $args[]
|
* @param string[] ...$args
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public function setListOrder(...$args)
|
public function setListOrder(...$args)
|
||||||
@ -1733,7 +1733,7 @@ class SFTP extends SSH2
|
|||||||
* Helper function for directory creation
|
* Helper function for directory creation
|
||||||
*
|
*
|
||||||
* @param string $dir
|
* @param string $dir
|
||||||
* @param string $attr
|
* @param int $mode
|
||||||
* @return bool
|
* @return bool
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -2853,6 +2853,7 @@ class SFTP extends 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 self::send_channel_packet()
|
* @see self::send_channel_packet()
|
||||||
* @return bool
|
* @return bool
|
||||||
|
@ -767,8 +767,8 @@ class 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
|
||||||
*/
|
*/
|
||||||
|
@ -2038,7 +2038,7 @@ class SSH2
|
|||||||
* The $password parameter can be a plaintext password, a \phpseclib3\Crypt\RSA object or an array
|
* The $password parameter can be a plaintext password, a \phpseclib3\Crypt\RSA object or an array
|
||||||
*
|
*
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @param $args[] param mixed $password
|
* @param string[] ...$args
|
||||||
* @return bool
|
* @return bool
|
||||||
* @see self::_login()
|
* @see self::_login()
|
||||||
* @access public
|
* @access public
|
||||||
@ -2064,7 +2064,7 @@ class SSH2
|
|||||||
* Login Helper
|
* Login Helper
|
||||||
*
|
*
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @param $args[] param mixed $password
|
* @param string[] ...$args
|
||||||
* @return bool
|
* @return bool
|
||||||
* @see self::_login_helper()
|
* @see self::_login_helper()
|
||||||
* @access private
|
* @access private
|
||||||
@ -2275,7 +2275,7 @@ class SSH2
|
|||||||
/**
|
/**
|
||||||
* Handle the keyboard-interactive requests / responses.
|
* Handle the keyboard-interactive requests / responses.
|
||||||
*
|
*
|
||||||
* @param $responses[]
|
* @param mixed[] ...$responses
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws \RuntimeException on connection error
|
* @throws \RuntimeException on connection error
|
||||||
* @access private
|
* @access private
|
||||||
@ -3161,7 +3161,7 @@ class SSH2
|
|||||||
* See '6. Binary Packet Protocol' of rfc4253 for more info.
|
* See '6. Binary Packet Protocol' of rfc4253 for more info.
|
||||||
*
|
*
|
||||||
* @see self::_send_binary_packet()
|
* @see self::_send_binary_packet()
|
||||||
* @param bool $filter_channel_packets
|
* @param bool $skip_channel_filter
|
||||||
* @return string
|
* @return string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -3379,7 +3379,7 @@ class SSH2
|
|||||||
*
|
*
|
||||||
* @see self::_get_binary_packet()
|
* @see self::_get_binary_packet()
|
||||||
* @param string $payload
|
* @param string $payload
|
||||||
* @param bool $filter_channel_packets
|
* @param bool $skip_channel_filter
|
||||||
* @return string
|
* @return string
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
@ -4135,7 +4135,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.
|
* 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 $args[]
|
* @param mixed[] ...$args
|
||||||
* @access protected
|
* @access protected
|
||||||
*/
|
*/
|
||||||
protected function define_array(...$args)
|
protected function define_array(...$args)
|
||||||
|
@ -242,7 +242,7 @@ class Identity implements PrivateKey
|
|||||||
* Valid values are: ASN1, SSH2, Raw
|
* Valid values are: ASN1, SSH2, Raw
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $padding
|
* @param string $format
|
||||||
*/
|
*/
|
||||||
public function withSignatureFormat($format)
|
public function withSignatureFormat($format)
|
||||||
{
|
{
|
||||||
@ -279,7 +279,6 @@ class Identity implements PrivateKey
|
|||||||
* See "2.6.2 Protocol 2 private key signature request"
|
* See "2.6.2 Protocol 2 private key signature request"
|
||||||
*
|
*
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param int $padding optional
|
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \RuntimeException on connection errors
|
* @throws \RuntimeException on connection errors
|
||||||
* @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported
|
* @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported
|
||||||
|
@ -27,8 +27,7 @@ trait ReadBytes
|
|||||||
/**
|
/**
|
||||||
* Read data
|
* Read data
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param int $length
|
||||||
* @return string Data from SSH Agent
|
|
||||||
* @throws \RuntimeException on connection errors
|
* @throws \RuntimeException on connection errors
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user