Applied fixes from StyleCI
This commit is contained in:
parent
5c0c0909ed
commit
cc20b7407f
@ -230,7 +230,7 @@ class Session
|
||||
$server_nonce = $ResPQ['server_nonce'];
|
||||
$public_key_fingerprint = $ResPQ['server_public_key_fingerprints'][0];
|
||||
$pq_bytes = $ResPQ['pq'];
|
||||
|
||||
|
||||
$pq = new \phpseclib\Math\BigInteger($pq_bytes, 256);
|
||||
var_dump($this->PrimeModule->primefactors($pq));
|
||||
die;
|
||||
|
@ -79,10 +79,10 @@ class PrimeModule
|
||||
$one = new \phpseclib\Math\BigInteger(1);
|
||||
$two = new \phpseclib\Math\BigInteger(2);
|
||||
$three = new \phpseclib\Math\BigInteger(3);
|
||||
if ($n->powMod($one, $two)->toString() == "0") {
|
||||
if ($n->powMod($one, $two)->toString() == '0') {
|
||||
return 2;
|
||||
}
|
||||
if ($n->powMod($one, $three)->toString() == "0") {
|
||||
if ($n->powMod($one, $three)->toString() == '0') {
|
||||
return 3;
|
||||
}
|
||||
$big = new \phpseclib\Math\BigInteger();
|
||||
@ -136,7 +136,7 @@ class PrimeModule
|
||||
if ($limit->compare($checker) == -1) {
|
||||
break;
|
||||
}
|
||||
while ($n->modPow($one, $checker)->toString() == "0") {
|
||||
while ($n->modPow($one, $checker)->toString() == '0') {
|
||||
$factors[] = $checker;
|
||||
$n = $n->divide($checker)[0];
|
||||
$limit = $n->root()->add($one);
|
||||
|
Loading…
Reference in New Issue
Block a user