mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-29 12:32:45 +00:00
I have upgraded to php 8.2 with the tests running successfully
This commit is contained in:
parent
b0e034ff9d
commit
a3ce8392fd
@ -263,6 +263,11 @@ abstract class SymmetricKey
|
||||
*/
|
||||
protected $debuffer;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $buffer;
|
||||
|
||||
/**
|
||||
* Does internal cipher state need to be (re)initialized?
|
||||
*
|
||||
|
@ -124,6 +124,11 @@ class DES extends BlockCipher
|
||||
*/
|
||||
private $keys;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $kl;
|
||||
|
||||
/**
|
||||
* Shuffle table.
|
||||
*
|
||||
|
@ -15,6 +15,7 @@ namespace phpseclib3\Crypt\DH;
|
||||
|
||||
use phpseclib3\Crypt\Common;
|
||||
use phpseclib3\Crypt\DH;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
/**
|
||||
* DH Public Key
|
||||
@ -25,6 +26,13 @@ class PublicKey extends DH
|
||||
{
|
||||
use Common\Traits\Fingerprint;
|
||||
|
||||
/**
|
||||
* Public Key
|
||||
*
|
||||
* @var BigInteger
|
||||
*/
|
||||
protected $publicKey;
|
||||
|
||||
/**
|
||||
* Returns the public key
|
||||
*
|
||||
@ -40,7 +48,7 @@ class PublicKey extends DH
|
||||
/**
|
||||
* Returns the public key as a BigInteger
|
||||
*/
|
||||
public function toBigInteger(): \phpseclib3\Math\BigInteger
|
||||
public function toBigInteger(): BigInteger
|
||||
{
|
||||
return $this->publicKey;
|
||||
}
|
||||
|
@ -125,6 +125,11 @@ abstract class EC extends AsymmetricKey
|
||||
*/
|
||||
protected $context;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $sigFormat;
|
||||
|
||||
/**
|
||||
* Create public / private key pair.
|
||||
*/
|
||||
|
@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp160k1 extends KoblitzPrime
|
||||
{
|
||||
public $basis;
|
||||
|
||||
public $beta;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// same as secp160r2
|
||||
|
@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp192k1 extends KoblitzPrime
|
||||
{
|
||||
public $basis;
|
||||
|
||||
public $beta;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37', 16));
|
||||
|
@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp224k1 extends KoblitzPrime
|
||||
{
|
||||
public $basis;
|
||||
|
||||
public $beta;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D', 16));
|
||||
|
@ -24,6 +24,10 @@ use phpseclib3\Math\BigInteger;
|
||||
//class secp256k1 extends Prime
|
||||
class secp256k1 extends KoblitzPrime
|
||||
{
|
||||
public $basis;
|
||||
|
||||
public $beta;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F', 16));
|
||||
|
@ -170,6 +170,11 @@ class Hash
|
||||
*/
|
||||
private $pad;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $blockSize;
|
||||
|
||||
/**#@+
|
||||
* UMAC variables
|
||||
*
|
||||
|
@ -55,6 +55,11 @@ class PrivateKey extends RSA implements Common\PrivateKey
|
||||
*/
|
||||
protected $publicExponent = false;
|
||||
|
||||
/**
|
||||
* Private Exponent
|
||||
*/
|
||||
protected $privateExponent;
|
||||
|
||||
/**
|
||||
* RSADP
|
||||
*
|
||||
|
@ -34,6 +34,16 @@ class PublicKey extends RSA implements Common\PublicKey
|
||||
{
|
||||
use Common\Traits\Fingerprint;
|
||||
|
||||
/**
|
||||
* Public Exponent
|
||||
*/
|
||||
protected $publicExponent = false;
|
||||
|
||||
/**
|
||||
* Private Exponent
|
||||
*/
|
||||
protected $privateExponent;
|
||||
|
||||
/**
|
||||
* Exponentiate
|
||||
*/
|
||||
|
@ -79,6 +79,11 @@ class BigInteger implements \JsonSerializable
|
||||
*/
|
||||
private $precision;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $secret;
|
||||
|
||||
/**
|
||||
* Sets engine type.
|
||||
*
|
||||
|
@ -57,7 +57,7 @@ abstract class EvalBarrett extends Base
|
||||
$lhs->value = $x;
|
||||
$rhs = new ' . $class . '();
|
||||
$rhs->value = [' .
|
||||
implode(',', array_map('self::float2string', $m->value)) . '];
|
||||
implode(',', array_map(self::class . '::float2string', $m->value)) . '];
|
||||
list(, $temp) = $lhs->divide($rhs);
|
||||
return $temp->value;
|
||||
';
|
||||
@ -98,7 +98,7 @@ abstract class EvalBarrett extends Base
|
||||
$rhs = new ' . $class . '();
|
||||
$lhs->value = $n;
|
||||
$rhs->value = [' .
|
||||
implode(',', array_map('self::float2string', $m)) . '];
|
||||
implode(',', array_map(self::class . '::float2string', $m)) . '];
|
||||
list(, $temp) = $lhs->divide($rhs);
|
||||
return $temp->value;
|
||||
}
|
||||
|
@ -62,6 +62,11 @@ class Integer extends Base
|
||||
*/
|
||||
protected static $reduce;
|
||||
|
||||
/**
|
||||
* @var bool|string
|
||||
*/
|
||||
public $key;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
|
@ -41,6 +41,11 @@ class PrimeField extends FiniteField
|
||||
*/
|
||||
protected $instanceID;
|
||||
|
||||
/**
|
||||
* @var BigInteger
|
||||
*/
|
||||
protected $modulo;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user