Applied fixes from StyleCI

This commit is contained in:
Daniil Gentili 2016-07-30 11:17:15 -04:00 committed by StyleCI Bot
parent 5c0c0909ed
commit cc20b7407f
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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);