Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for AES IGE #1095

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
9 changes: 8 additions & 1 deletion phpseclib/Math/BigInteger/Engines/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ abstract class PHP extends Engine
* @access protected
*/
const ENGINE_DIR = 'PHP';

/**
* Primes > 2 and < 1000
*
* @var array
*/
protected static $primes;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$primes is defined in PHP32.php and PHP64.php. PHP.php is abstract so it can't be instantiated anyway.

The reason I defined $primes in PHP32.php and PHP64.php was so that you wouldn't run into problems if you tried to instantiate both of them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind - I see you undid that in a newer commit - that you changed, later, self::$primes to static::$primes. I'd say that'd be a good PR on it's own. Maybe try adding a unit test too.


/**
* Default constructor
Expand Down Expand Up @@ -1326,4 +1333,4 @@ protected function powHelper(PHP $n)

return $temp;
}
}
}