2017-10-05 18:53:56 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace phpseclib\Math;
|
|
|
|
|
2018-06-22 13:28:33 +02:00
|
|
|
if (PHP_MAJOR_VERSION < 7 && !(class_exists('\\Phar') && \Phar::running())) {
|
2018-02-20 14:49:54 +00:00
|
|
|
throw new \Exception('MadelineProto requires php 7 to run');
|
2018-02-18 14:18:18 +01:00
|
|
|
}
|
2018-06-22 13:28:33 +02:00
|
|
|
if (defined('HHVM_VERSION')) {
|
|
|
|
$engines = [['PHP64', ['OpenSSL']], ['BCMath', ['OpenSSL']], ['PHP32', ['OpenSSL']]];
|
|
|
|
foreach ($engines as $engine) {
|
|
|
|
try {
|
2018-06-22 11:35:08 +00:00
|
|
|
\phpseclib\Math\BigInteger::setEngine($engine[0], isset($engine[1]) ? $engine[1] : []);
|
|
|
|
break;
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
}
|
2018-06-22 13:28:33 +02:00
|
|
|
}
|
|
|
|
}
|
2018-02-18 14:18:18 +01:00
|
|
|
|
2017-10-05 15:54:27 +00:00
|
|
|
class BigIntegor
|
|
|
|
{
|
2017-10-05 18:53:56 +03:00
|
|
|
}
|