mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-05 05:18:28 +00:00
[feature/elliptic-curve] Do not instantiate unnecessary $x instance.
This commit is contained in:
parent
97cf60900d
commit
7253e77386
@ -1197,8 +1197,7 @@ class Net_SSH2 {
|
||||
$max = $one->bitwise_leftShift(16 * $keyLength)->subtract($one); // 2 * 8 * $keyLength
|
||||
|
||||
$g = new Math_BigInteger(2);
|
||||
$x = new Math_BigInteger();
|
||||
$x = $x->random($one, $max);
|
||||
$x = $one->random($one, $max);
|
||||
$e = $g->modPow($x, $p);
|
||||
|
||||
$eBytes = $e->toBytes(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user