mirror of
https://github.com/kvazar-network/crypto-php.git
synced 2025-01-31 09:14:42 +00:00
fix data types
This commit is contained in:
parent
6ac12c61fc
commit
857f554689
16
src/Tool.php
16
src/Tool.php
@ -35,13 +35,13 @@ class Tool
|
||||
while ($dec > $base - 1)
|
||||
{
|
||||
$rest = bcmod(
|
||||
$dec,
|
||||
$base
|
||||
(string) $dec,
|
||||
(string) $base
|
||||
);
|
||||
|
||||
$dec = bcdiv(
|
||||
$dec,
|
||||
$base
|
||||
(string) $dec,
|
||||
(string) $base
|
||||
);
|
||||
|
||||
$value = $digits[$rest] . $value;
|
||||
@ -89,15 +89,15 @@ class Tool
|
||||
);
|
||||
|
||||
$power = bcpow(
|
||||
$base,
|
||||
$size - $loop - 1
|
||||
(string) $base,
|
||||
(string) ($size - $loop - 1)
|
||||
);
|
||||
|
||||
$dec = bcadd(
|
||||
$dec,
|
||||
bcmul(
|
||||
$element,
|
||||
$power
|
||||
(string) $element,
|
||||
(string) $power
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user