Skip to content

Commit 85d7f75

Browse files
Merge pull request #5 from sandfoxme/php-8.4
PHP 8.4 Support
2 parents f0f602d + cbe54bc commit 85d7f75

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"keywords": [ "x690", "x.690", "x.509", "x509", "asn1", "asn.1", "ber", "der", "binary", "encoding", "decoding" ],
2525

2626
"require": {
27-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0"
27+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
2828
},
2929
"require-dev": {
3030
"phpunit/phpunit": "^9.0",

lib/Utility/BigIntegerGmp.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,21 +106,21 @@ public function toPower($b)
106106
$b = gmp_intval($b->_rh);
107107
}
108108
$ret = new self();
109-
$ret->_rh = gmp_pow($this->_rh, $b);
109+
$ret->_rh = $this->_rh ** $b;
110110
return $ret;
111111
}
112112

113113
public function shiftRight($bits=8)
114114
{
115115
$ret = new self();
116-
$ret->_rh = gmp_div($this->_rh, gmp_pow(2, $bits));
116+
$ret->_rh = $this->_rh >> $bits;
117117
return $ret;
118118
}
119119

120120
public function shiftLeft($bits=8)
121121
{
122122
$ret = new self();
123-
$ret->_rh = gmp_mul($this->_rh, gmp_pow(2, $bits));
123+
$ret->_rh = $this->_rh << $bits;
124124
return $ret;
125125
}
126126

0 commit comments

Comments
 (0)