I have upgraded to php 8.2 with the tests running successfully

This commit is contained in:
Jonny Fonsato 2022-07-19 10:56:37 +02:00
parent b0e034ff9d
commit a3ce8392fd
No known key found for this signature in database
GPG Key ID: 8786B03DB82F62DD
15 changed files with 77 additions and 3 deletions

View File

@ -263,6 +263,11 @@ abstract class SymmetricKey
*/ */
protected $debuffer; protected $debuffer;
/**
* @var array
*/
protected $buffer;
/** /**
* Does internal cipher state need to be (re)initialized? * Does internal cipher state need to be (re)initialized?
* *

View File

@ -124,6 +124,11 @@ class DES extends BlockCipher
*/ */
private $keys; private $keys;
/**
* @var array
*/
private $kl;
/** /**
* Shuffle table. * Shuffle table.
* *

View File

@ -15,6 +15,7 @@ namespace phpseclib3\Crypt\DH;
use phpseclib3\Crypt\Common; use phpseclib3\Crypt\Common;
use phpseclib3\Crypt\DH; use phpseclib3\Crypt\DH;
use phpseclib3\Math\BigInteger;
/** /**
* DH Public Key * DH Public Key
@ -25,6 +26,13 @@ class PublicKey extends DH
{ {
use Common\Traits\Fingerprint; use Common\Traits\Fingerprint;
/**
* Public Key
*
* @var BigInteger
*/
protected $publicKey;
/** /**
* Returns the public key * Returns the public key
* *
@ -40,7 +48,7 @@ class PublicKey extends DH
/** /**
* Returns the public key as a BigInteger * Returns the public key as a BigInteger
*/ */
public function toBigInteger(): \phpseclib3\Math\BigInteger public function toBigInteger(): BigInteger
{ {
return $this->publicKey; return $this->publicKey;
} }

View File

@ -125,6 +125,11 @@ abstract class EC extends AsymmetricKey
*/ */
protected $context; protected $context;
/**
* @var string
*/
protected $sigFormat;
/** /**
* Create public / private key pair. * Create public / private key pair.
*/ */

View File

@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger;
class secp160k1 extends KoblitzPrime class secp160k1 extends KoblitzPrime
{ {
public $basis;
public $beta;
public function __construct() public function __construct()
{ {
// same as secp160r2 // same as secp160r2

View File

@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger;
class secp192k1 extends KoblitzPrime class secp192k1 extends KoblitzPrime
{ {
public $basis;
public $beta;
public function __construct() public function __construct()
{ {
$this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37', 16)); $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37', 16));

View File

@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger;
class secp224k1 extends KoblitzPrime class secp224k1 extends KoblitzPrime
{ {
public $basis;
public $beta;
public function __construct() public function __construct()
{ {
$this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D', 16)); $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D', 16));

View File

@ -24,6 +24,10 @@ use phpseclib3\Math\BigInteger;
//class secp256k1 extends Prime //class secp256k1 extends Prime
class secp256k1 extends KoblitzPrime class secp256k1 extends KoblitzPrime
{ {
public $basis;
public $beta;
public function __construct() public function __construct()
{ {
$this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F', 16)); $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F', 16));

View File

@ -170,6 +170,11 @@ class Hash
*/ */
private $pad; private $pad;
/**
* @var int
*/
private $blockSize;
/**#@+ /**#@+
* UMAC variables * UMAC variables
* *

View File

@ -55,6 +55,11 @@ class PrivateKey extends RSA implements Common\PrivateKey
*/ */
protected $publicExponent = false; protected $publicExponent = false;
/**
* Private Exponent
*/
protected $privateExponent;
/** /**
* RSADP * RSADP
* *

View File

@ -34,6 +34,16 @@ class PublicKey extends RSA implements Common\PublicKey
{ {
use Common\Traits\Fingerprint; use Common\Traits\Fingerprint;
/**
* Public Exponent
*/
protected $publicExponent = false;
/**
* Private Exponent
*/
protected $privateExponent;
/** /**
* Exponentiate * Exponentiate
*/ */

View File

@ -79,6 +79,11 @@ class BigInteger implements \JsonSerializable
*/ */
private $precision; private $precision;
/**
* @var string
*/
public $secret;
/** /**
* Sets engine type. * Sets engine type.
* *

View File

@ -57,7 +57,7 @@ abstract class EvalBarrett extends Base
$lhs->value = $x; $lhs->value = $x;
$rhs = new ' . $class . '(); $rhs = new ' . $class . '();
$rhs->value = [' . $rhs->value = [' .
implode(',', array_map('self::float2string', $m->value)) . ']; implode(',', array_map(self::class . '::float2string', $m->value)) . '];
list(, $temp) = $lhs->divide($rhs); list(, $temp) = $lhs->divide($rhs);
return $temp->value; return $temp->value;
'; ';
@ -98,7 +98,7 @@ abstract class EvalBarrett extends Base
$rhs = new ' . $class . '(); $rhs = new ' . $class . '();
$lhs->value = $n; $lhs->value = $n;
$rhs->value = [' . $rhs->value = [' .
implode(',', array_map('self::float2string', $m)) . ']; implode(',', array_map(self::class . '::float2string', $m)) . '];
list(, $temp) = $lhs->divide($rhs); list(, $temp) = $lhs->divide($rhs);
return $temp->value; return $temp->value;
} }

View File

@ -62,6 +62,11 @@ class Integer extends Base
*/ */
protected static $reduce; protected static $reduce;
/**
* @var bool|string
*/
public $key;
/** /**
* Default constructor * Default constructor
*/ */

View File

@ -41,6 +41,11 @@ class PrimeField extends FiniteField
*/ */
protected $instanceID; protected $instanceID;
/**
* @var BigInteger
*/
protected $modulo;
/** /**
* Default constructor * Default constructor
*/ */