| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/brest/libraries/vendor/web-token/jwt-library/Core/Util/Ecc/ |
Upload File : |
<?php
declare(strict_types=1);
namespace Jose\Component\Core\Util\Ecc;
use Brick\Math\BigInteger;
use Jose\Component\Core\Util\BigInteger as CoreBigInteger;
/**
* @internal
*/
final class Math
{
public static function equals(BigInteger $first, BigInteger $other): bool
{
return $first->isEqualTo($other);
}
public static function add(BigInteger $augend, BigInteger $addend): BigInteger
{
return $augend->plus($addend);
}
public static function toString(BigInteger $value): string
{
return $value->toBase(10);
}
public static function inverseMod(BigInteger $a, BigInteger $m): BigInteger
{
return CoreBigInteger::createFromBigInteger($a)->modInverse(CoreBigInteger::createFromBigInteger($m))->get();
}
public static function baseConvert(string $number, int $from, int $to): string
{
return BigInteger::fromBase($number, $from)->toBase($to);
}
}