return true;
} /** @var float $end */
$end = 0.0;
/** @var float $start */
$start =
microtime(true
);
/** @var ParagonIE_Sodium_Core32_Int64 $a */
$a = ParagonIE_Sodium_Core32_Int64::
fromInt(random_int(3, 1 << 16
));
for ($i = 0;
$i <
$iterations; ++
$i) { /** @var ParagonIE_Sodium_Core32_Int64 $b */
$b = ParagonIE_Sodium_Core32_Int64::
fromInt(random_int(3, 1 << 16
));
$a->
mulInt64($b);
} /** @var float $end */
$end =
microtime(true
);
/** @var int $diff */
$diff =
(int) ceil(($end -
$start) * 1000
);
return $diff <
$maxTimeout;
} /**
* Add two numbers (little-endian unsigned), storing the value in the first
* parameter.
*
* This mutates $val.
*
* @param string $val
* @param string $addv
* @return void
* @throws SodiumException
*/